psCharStrings

psCharStrings.py – module implementing various kinds of CharStrings: CFF dictionary data and Type1/Type2 CharStrings.

exception fontTools.misc.psCharStrings.CharStringCompileError[source]
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class fontTools.misc.psCharStrings.DictDecompiler(strings, parent=None)[source]
arg_SID(name)[source]
arg_array(name)[source]
arg_blendList(name)[source]

There may be non-blend args at the top of the stack. We first calculate where the blend args start in the stack. These are the last numMasters*numBlends) +1 args. The blend args starts with numMasters relative coordinate values, the BlueValues in the list from the default master font. This is followed by numBlends list of values. Each of value in one of these lists is the Variable Font delta for the matching region.

We re-arrange this to be a list of numMaster entries. Each entry starts with the corresponding default font relative value, and is followed by the delta values. We then convert the default values, the first item in each entry, to an absolute value.

arg_blend_number(name)[source]
arg_delta(name)[source]
arg_number(name)[source]
decompile(data)[source]
getDict()[source]
handle_operator(operator)[source]
operandEncoding = [<function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_shortInt>, <function read_longInt>, <function read_realNumber>, <function read_operator>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_smallInt1>, <function read_smallInt1>, <function read_smallInt1>, <function read_smallInt1>, <function read_smallInt2>, <function read_smallInt2>, <function read_smallInt2>, <function read_smallInt2>, <function read_reserved>]
pop()[source]
popall()[source]
class fontTools.misc.psCharStrings.SimpleT2Decompiler(localSubrs, globalSubrs, private=None)[source]
countHints()[source]
execute(charString)[source]
op_abs(index)[source]
op_add(index)[source]
op_and(index)[source]
op_blend(index)[source]
op_callgsubr(index)[source]
op_callsubr(index)[source]
op_cntrmask(index)
op_div(index)[source]
op_drop(index)[source]
op_dup(index)[source]
op_endchar(index)[source]
op_eq(index)[source]
op_exch(index)[source]
op_get(index)[source]
op_hintmask(index)[source]
op_hstem(index)[source]
op_hstemhm(index)[source]
op_ifelse(index)[source]
op_ignore(index)[source]
op_index(index)[source]
op_load(index)[source]
op_mul(index)[source]
op_neg(index)[source]
op_not(index)[source]
op_or(index)[source]
op_put(index)[source]
op_random(index)[source]
op_return(index)[source]
op_roll(index)[source]
op_sqrt(index)[source]
op_store(index)[source]
op_sub(index)[source]
op_vsindex(index)[source]
op_vstem(index)[source]
op_vstemhm(index)[source]
pop()[source]
popall()[source]
push(value)[source]
reset()[source]
class fontTools.misc.psCharStrings.T1CharString(bytecode=None, program=None, subrs=None)[source]
calcBounds(glyphSet)
compile(isCFF2=False)
decompile()[source]
decompilerClass

alias of SimpleT2Decompiler

draw(pen)[source]
fromXML(name, attrs, content)
getBytes(index, nBytes)
getFixedEncoder()[source]
getIntEncoder()[source]
getNumRegions(vsindex=None)
getToken(index, len=<built-in function len>, byteord=<function byteord>, basestring=<class 'str'>, isinstance=<built-in function isinstance>)
handle_operator(operator)
needsDecompilation()
opcodes = {'callothersubr': (12, 16), 'callsubr': (10,), 'closepath': (9,), 'div': (12, 12), 'dotsection': (12, 0), 'endchar': (14,), 'hlineto': (6,), 'hmoveto': (22,), 'hsbw': (13,), 'hstem': (1,), 'hstem3': (12, 2), 'hvcurveto': (31,), 'pop': (12, 17), 'return': (11,), 'rlineto': (5,), 'rmoveto': (21,), 'rrcurveto': (8,), 'sbw': (12, 7), 'seac': (12, 6), 'setcurrentpoint': (12, 33), 'vhcurveto': (30,), 'vlineto': (7,), 'vmoveto': (4,), 'vstem': (3,), 'vstem3': (12, 1)}
operandEncoding = [<function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_smallInt1>, <function read_smallInt1>, <function read_smallInt1>, <function read_smallInt1>, <function read_smallInt2>, <function read_smallInt2>, <function read_smallInt2>, <function read_smallInt2>, <function read_longInt>]
operators = {1: 'hstem', 3: 'vstem', 4: 'vmoveto', 5: 'rlineto', 6: 'hlineto', 7: 'vlineto', 8: 'rrcurveto', 9: 'closepath', 10: 'callsubr', 11: 'return', 13: 'hsbw', 14: 'endchar', 21: 'rmoveto', 22: 'hmoveto', 30: 'vhcurveto', 31: 'hvcurveto', (12, 0): 'dotsection', (12, 1): 'vstem3', (12, 2): 'hstem3', (12, 6): 'seac', (12, 7): 'sbw', (12, 12): 'div', (12, 16): 'callothersubr', (12, 17): 'pop', (12, 33): 'setcurrentpoint'}
outlineExtractor

alias of T2OutlineExtractor

setBytecode(bytecode)
setProgram(program)
toXML(xmlWriter, ttFont=None)
class fontTools.misc.psCharStrings.T1OutlineExtractor(pen, subrs)[source]
alternatingLineto(isHorizontal)
closePath()
countHints()
doFlex()[source]
endPath()[source]
exch()[source]
execute(charString)
hcurveto(args)
op_abs(index)
op_add(index)
op_and(index)
op_blend(index)
op_callgsubr(index)
op_callothersubr(index)[source]
op_callsubr(index)[source]
op_closepath(index)[source]
op_cntrmask(index)
op_div(index)
op_dotsection(index)[source]
op_drop(index)
op_dup(index)
op_endchar(index)[source]
op_eq(index)
op_exch(index)
op_flex(index)
op_flex1(index)
op_get(index)
op_hflex(index)
op_hflex1(index)
op_hhcurveto(index)

dy1? {dxa dxb dyb dxc}+ hhcurveto

op_hintmask(index)
op_hlineto(index)
op_hmoveto(index)[source]
op_hsbw(index)[source]
op_hstem(index)
op_hstem3(index)[source]
op_hstemhm(index)
op_hvcurveto(index)

dx1 dx2 dy2 dy3 {dya dxb dyb dxc dxd dxe dye dyf}* dxf? {dxa dxb dyb dyc dyd dxe dye dxf}+ dyf?

op_ifelse(index)
op_ignore(index)
op_index(index)
op_load(index)
op_mul(index)
op_neg(index)
op_not(index)
op_or(index)
op_pop(index)[source]
op_put(index)
op_random(index)
op_rcurveline(index)

{dxa dya dxb dyb dxc dyc}+ dxd dyd rcurveline

op_return(index)
op_rlinecurve(index)

{dxa dya}+ dxb dyb dxc dyc dxd dyd rlinecurve

op_rlineto(index)
op_rmoveto(index)[source]
op_roll(index)
op_rrcurveto(index)

{dxa dya dxb dyb dxc dyc}+ rrcurveto

op_sbw(index)[source]
op_seac(index)[source]

asb adx ady bchar achar seac

op_setcurrentpoint(index)[source]
op_sqrt(index)
op_store(index)
op_sub(index)
op_vhcurveto(index)

dy1 dx2 dy2 dx3 {dxa dxb dyb dyc dyd dxe dye dxf}* dyf? vhcurveto (30) {dya dxb dyb dxc dxd dxe dye dyf}+ dxf? vhcurveto

op_vlineto(index)
op_vmoveto(index)[source]
op_vsindex(index)
op_vstem(index)
op_vstem3(index)[source]
op_vstemhm(index)
op_vvcurveto(index)

dx1? {dya dxb dyb dyc}+ vvcurveto

pop()
popall()
popallWidth(evenOdd=0)[source]
push(value)
rCurveTo(pt1, pt2, pt3)
rLineTo(point)
rMoveTo(point)
reset()[source]
vcurveto(args)
class fontTools.misc.psCharStrings.T2CharString(bytecode=None, program=None, private=None, globalSubrs=None)[source]
calcBounds(glyphSet)[source]
compile(isCFF2=False)[source]
decompile()[source]
decompilerClass

alias of SimpleT2Decompiler

draw(pen)[source]
fromXML(name, attrs, content)[source]
getBytes(index, nBytes)[source]
getFixedEncoder()[source]
getIntEncoder()[source]
getNumRegions(vsindex=None)[source]
getToken(index, len=<built-in function len>, byteord=<function byteord>, basestring=<class 'str'>, isinstance=<built-in function isinstance>)[source]
handle_operator(operator)[source]
needsDecompilation()[source]
opcodes = {'abs': (12, 9), 'add': (12, 10), 'and': (12, 3), 'blend': (16,), 'callgsubr': (29,), 'callsubr': (10,), 'cntrmask': (20,), 'div': (12, 12), 'drop': (12, 18), 'dup': (12, 27), 'endchar': (14,), 'eq': (12, 15), 'exch': (12, 28), 'flex': (12, 35), 'flex1': (12, 37), 'get': (12, 21), 'hflex': (12, 34), 'hflex1': (12, 36), 'hhcurveto': (27,), 'hintmask': (19,), 'hlineto': (6,), 'hmoveto': (22,), 'hstem': (1,), 'hstemhm': (18,), 'hvcurveto': (31,), 'ifelse': (12, 22), 'ignore': (12, 0), 'index': (12, 29), 'load': (12, 13), 'mul': (12, 24), 'neg': (12, 14), 'not': (12, 5), 'or': (12, 4), 'put': (12, 20), 'random': (12, 23), 'rcurveline': (24,), 'return': (11,), 'rlinecurve': (25,), 'rlineto': (5,), 'rmoveto': (21,), 'roll': (12, 30), 'rrcurveto': (8,), 'sqrt': (12, 26), 'store': (12, 8), 'sub': (12, 11), 'vhcurveto': (30,), 'vlineto': (7,), 'vmoveto': (4,), 'vsindex': (15,), 'vstem': (3,), 'vstemhm': (23,), 'vvcurveto': (26,)}
operandEncoding = [<function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_shortInt>, <function read_operator>, <function read_operator>, <function read_operator>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_byte>, <function read_smallInt1>, <function read_smallInt1>, <function read_smallInt1>, <function read_smallInt1>, <function read_smallInt2>, <function read_smallInt2>, <function read_smallInt2>, <function read_smallInt2>, <function read_fixed1616>]
operators = {1: 'hstem', 3: 'vstem', 4: 'vmoveto', 5: 'rlineto', 6: 'hlineto', 7: 'vlineto', 8: 'rrcurveto', 10: 'callsubr', 11: 'return', 14: 'endchar', 15: 'vsindex', 16: 'blend', 18: 'hstemhm', 19: 'hintmask', 20: 'cntrmask', 21: 'rmoveto', 22: 'hmoveto', 23: 'vstemhm', 24: 'rcurveline', 25: 'rlinecurve', 26: 'vvcurveto', 27: 'hhcurveto', 29: 'callgsubr', 30: 'vhcurveto', 31: 'hvcurveto', (12, 0): 'ignore', (12, 3): 'and', (12, 4): 'or', (12, 5): 'not', (12, 8): 'store', (12, 9): 'abs', (12, 10): 'add', (12, 11): 'sub', (12, 12): 'div', (12, 13): 'load', (12, 14): 'neg', (12, 15): 'eq', (12, 18): 'drop', (12, 20): 'put', (12, 21): 'get', (12, 22): 'ifelse', (12, 23): 'random', (12, 24): 'mul', (12, 26): 'sqrt', (12, 27): 'dup', (12, 28): 'exch', (12, 29): 'index', (12, 30): 'roll', (12, 34): 'hflex', (12, 35): 'flex', (12, 36): 'hflex1', (12, 37): 'flex1'}
outlineExtractor

alias of T2OutlineExtractor

setBytecode(bytecode)[source]
setProgram(program)[source]
toXML(xmlWriter, ttFont=None)[source]
class fontTools.misc.psCharStrings.T2OutlineExtractor(pen, localSubrs, globalSubrs, nominalWidthX, defaultWidthX, private=None)[source]
alternatingLineto(isHorizontal)[source]
closePath()[source]
countHints()
endPath()[source]
execute(charString)
hcurveto(args)[source]
op_abs(index)[source]
op_add(index)[source]
op_and(index)[source]
op_blend(index)
op_callgsubr(index)
op_callsubr(index)
op_cntrmask(index)
op_div(index)[source]
op_drop(index)[source]
op_dup(index)[source]
op_endchar(index)[source]
op_eq(index)[source]
op_exch(index)[source]
op_flex(index)[source]
op_flex1(index)[source]
op_get(index)[source]
op_hflex(index)[source]
op_hflex1(index)[source]
op_hhcurveto(index)[source]

dy1? {dxa dxb dyb dxc}+ hhcurveto

op_hintmask(index)
op_hlineto(index)[source]
op_hmoveto(index)[source]
op_hstem(index)
op_hstemhm(index)
op_hvcurveto(index)[source]

dx1 dx2 dy2 dy3 {dya dxb dyb dxc dxd dxe dye dyf}* dxf? {dxa dxb dyb dyc dyd dxe dye dxf}+ dyf?

op_ifelse(index)[source]
op_ignore(index)
op_index(index)[source]
op_load(index)[source]
op_mul(index)[source]
op_neg(index)[source]
op_not(index)[source]
op_or(index)[source]
op_put(index)[source]
op_random(index)[source]
op_rcurveline(index)[source]

{dxa dya dxb dyb dxc dyc}+ dxd dyd rcurveline

op_return(index)
op_rlinecurve(index)[source]

{dxa dya}+ dxb dyb dxc dyc dxd dyd rlinecurve

op_rlineto(index)[source]
op_rmoveto(index)[source]
op_roll(index)[source]
op_rrcurveto(index)[source]

{dxa dya dxb dyb dxc dyc}+ rrcurveto

op_sqrt(index)[source]
op_store(index)[source]
op_sub(index)[source]
op_vhcurveto(index)[source]

dy1 dx2 dy2 dx3 {dxa dxb dyb dyc dyd dxe dye dxf}* dyf? vhcurveto (30) {dya dxb dyb dxc dxd dxe dye dyf}+ dxf? vhcurveto

op_vlineto(index)[source]
op_vmoveto(index)[source]
op_vsindex(index)
op_vstem(index)
op_vstemhm(index)
op_vvcurveto(index)[source]

dx1? {dya dxb dyb dyc}+ vvcurveto

pop()
popall()
popallWidth(evenOdd=0)
push(value)
rCurveTo(pt1, pt2, pt3)[source]
rLineTo(point)[source]
rMoveTo(point)[source]
reset()[source]
vcurveto(args)[source]
class fontTools.misc.psCharStrings.T2WidthExtractor(localSubrs, globalSubrs, nominalWidthX, defaultWidthX, private=None)[source]
countHints()[source]
execute(charString)
op_abs(index)
op_add(index)
op_and(index)
op_blend(index)
op_callgsubr(index)
op_callsubr(index)
op_cntrmask(index)
op_div(index)
op_drop(index)
op_dup(index)
op_endchar(index)[source]
op_eq(index)
op_exch(index)
op_get(index)
op_hintmask(index)
op_hmoveto(index)[source]
op_hstem(index)
op_hstemhm(index)
op_ifelse(index)
op_ignore(index)
op_index(index)
op_load(index)
op_mul(index)
op_neg(index)
op_not(index)
op_or(index)
op_put(index)
op_random(index)
op_return(index)
op_rmoveto(index)[source]
op_roll(index)
op_sqrt(index)
op_store(index)
op_sub(index)
op_vmoveto(index)[source]
op_vsindex(index)
op_vstem(index)
op_vstemhm(index)
pop()
popall()
popallWidth(evenOdd=0)[source]
push(value)
reset()[source]
fontTools.misc.psCharStrings.buildOperatorDict(operatorList)[source]
fontTools.misc.psCharStrings.calcSubrBias(subrs)[source]
fontTools.misc.psCharStrings.encodeFixed(f, pack=<built-in function pack>)[source]

For T2 only

fontTools.misc.psCharStrings.encodeFloat(f)[source]
fontTools.misc.psCharStrings.encodeIntCFF(value, fourByteOp=b'\x1d', bytechr=<function bytechr>, pack=<built-in function pack>, unpack=<built-in function unpack>)
fontTools.misc.psCharStrings.encodeIntT1(value, fourByteOp=b'\xff', bytechr=<function bytechr>, pack=<built-in function pack>, unpack=<built-in function unpack>)
fontTools.misc.psCharStrings.encodeIntT2(value, fourByteOp=None, bytechr=<function bytechr>, pack=<built-in function pack>, unpack=<built-in function unpack>)
fontTools.misc.psCharStrings.getIntEncoder(format)[source]
fontTools.misc.psCharStrings.read_byte(self, b0, data, index)[source]
fontTools.misc.psCharStrings.read_fixed1616(self, b0, data, index)[source]
fontTools.misc.psCharStrings.read_longInt(self, b0, data, index)[source]
fontTools.misc.psCharStrings.read_operator(self, b0, data, index)[source]
fontTools.misc.psCharStrings.read_realNumber(self, b0, data, index)[source]
fontTools.misc.psCharStrings.read_reserved(self, b0, data, index)[source]
fontTools.misc.psCharStrings.read_shortInt(self, b0, data, index)[source]
fontTools.misc.psCharStrings.read_smallInt1(self, b0, data, index)[source]
fontTools.misc.psCharStrings.read_smallInt2(self, b0, data, index)[source]