ttProgram

ttLib.tables.ttProgram.py – Assembler/disassembler for TrueType bytecode programs.

fontTools.ttLib.tables.ttProgram.bitRepr(value, bits)
fontTools.ttLib.tables.ttProgram._makeDict(instructionList)
exception fontTools.ttLib.tables.ttProgram.tt_instructions_error(error)

Bases: exceptions.Exception

fontTools.ttLib.tables.ttProgram._skipWhite(data, pos, _whiteRE=<_sre.SRE_Pattern object at 0x10579f030>)
class fontTools.ttLib.tables.ttProgram.Program
fromBytecode(bytecode)
fromAssembly(assembly)
getBytecode()
getAssembly()
toXML(writer, ttFont)
fromXML((name, attrs, content), ttFont)
_assemble(skipWhite=<function _skipWhite>, mnemonicDict={'RDTG': (125, 0, 'RoundDownToGrid'), 'SRP1': (17, 0, 'SetRefPoint1'), 'MIN': (140, 0, 'Minimum'), 'WCVTF': (112, 0, 'WriteCVTInFUnits'), 'SANGW': (126, 0, 'SetAngleWeight'), 'MSIRP': (58, 1, 'MoveStackIndirRelPt'), 'WS': (66, 0, 'WriteStore'), 'SROUND': (118, 0, 'SuperRound'), 'MIRP': (224, 5, 'MoveIndirectRelPt'), 'WCVTP': (68, 0, 'WriteCVTInPixels'), 'SRP2': (18, 0, 'SetRefPoint2'), 'MDRP': (192, 5, 'MoveDirectRelPt'), 'RS': (67, 0, 'ReadStore'), 'SCVTCI': (29, 0, 'SetCVTCutIn'), 'SRP0': (16, 0, 'SetRefPoint0'), 'SFVTCA': (4, 1, 'SetFVectorToAxis'), 'SZPS': (22, 0, 'SetZonePointerS'), 'GT': (82, 0, 'GreaterThan'), 'FLOOR': (102, 0, 'Floor'), 'MINDEX': (38, 0, 'MoveXToTopStack'), 'CLEAR': (34, 0, 'ClearStack'), 'GC': (70, 1, 'GetCoordOnPVector'), 'ENDF': (45, 0, 'EndFunctionDefinition'), 'GPV': (12, 0, 'GetPVector'), 'INSTCTRL': (142, 0, 'SetInstrExecControl'), 'SZP2': (21, 0, 'SetZonePointer2'), 'SZP1': (20, 0, 'SetZonePointer1'), 'SZP0': (19, 0, 'SetZonePointer0'), 'S45ROUND': (119, 0, 'SuperRound45Degrees'), 'SSWCI': (30, 0, 'SetSingleWidthCutIn'), 'MAX': (139, 0, 'Maximum'), 'FLIPRGOFF': (130, 0, 'FlipRangeOff'), 'JMPR': (28, 0, 'Jump'), 'SFVTL': (8, 1, 'SetFVectorToLine'), 'SPVTCA': (2, 1, 'SetPVectorToAxis'), 'OR': (91, 0, 'LogicalOr'), 'RCVT': (69, 0, 'ReadCVT'), 'SPVFS': (10, 0, 'SetPVectorFromStack'), 'ROUND': (104, 2, 'Round'), 'RTG': (24, 0, 'RoundToGrid'), 'ALIGNPTS': (39, 0, 'AlignPts'), 'MIAP': (62, 1, 'MoveIndirectAbsPt'), 'RTHG': (25, 0, 'RoundToHalfGrid'), 'IUP': (48, 1, 'InterpolateUntPts'), 'SHP': (50, 1, 'ShiftPointByLastPoint'), 'SFVFS': (11, 0, 'SetFVectorFromStack'), 'SHZ': (54, 1, 'ShiftZoneByLastPoint'), 'ELSE': (27, 0, 'Else'), 'SHC': (52, 1, 'ShiftContourByLastPt'), 'SUB': (97, 0, 'Subtract'), 'DEBUG': (79, 0, 'DebugCall'), 'EQ': (84, 0, 'Equal'), 'RTDG': (61, 0, 'RoundToDoubleGrid'), 'AND': (90, 0, 'LogicalAnd'), 'MD': (73, 1, 'MeasureDistance'), 'SSW': (31, 0, 'SetSingleWidth'), 'FLIPPT': (128, 0, 'FlipPoint'), 'MPS': (76, 0, 'MeasurePointSize'), 'NOT': (92, 0, 'LogicalNot'), 'SDPVTL': (134, 1, 'SetDualPVectorToLine'), 'ROFF': (122, 0, 'RoundOff'), 'GTEQ': (83, 0, 'GreaterThanOrEqual'), 'NEG': (101, 0, 'Negate'), 'IDEF': (137, 0, 'InstructionDefinition'), 'FLIPOFF': (78, 0, 'SetAutoFlipOff'), 'FDEF': (44, 0, 'FunctionDefinition'), 'MUL': (99, 0, 'Multiply'), 'SMD': (26, 0, 'SetMinimumDistance'), 'NEQ': (85, 0, 'NotEqual'), 'SLOOP': (23, 0, 'SetLoopVariable'), 'MDAP': (46, 1, 'MoveDirectAbsPt'), 'ISECT': (15, 0, 'MovePtToIntersect'), 'SPVTL': (6, 1, 'SetPVectorToLine'), 'CINDEX': (37, 0, 'CopyXToTopStack'), 'SWAP': (35, 0, 'SwapTopStack'), 'ODD': (86, 0, 'Odd'), 'JROF': (121, 0, 'JumpRelativeOnFalse'), 'NROUND': (108, 2, 'NoRound'), 'DELTAC1': (115, 0, 'DeltaExceptionC1'), 'DELTAC2': (116, 0, 'DeltaExceptionC2'), 'DELTAC3': (117, 0, 'DeltaExceptionC3'), 'JROT': (120, 0, 'JumpRelativeOnTrue'), 'ADD': (96, 0, 'Add'), 'DUP': (32, 0, 'DuplicateTopStack'), 'SVTCA': (0, 1, 'SetFPVectorToAxis'), 'SFVTPV': (14, 0, 'SetFVectorToPVector'), 'LOOPCALL': (42, 0, 'LoopAndCallFunction'), 'EVEN': (87, 0, 'Even'), 'LTEQ': (81, 0, 'LessThenOrEqual'), 'SDS': (95, 0, 'SetDeltaShiftInGState'), 'FLIPRGON': (129, 0, 'FlipRangeOn'), 'DEPTH': (36, 0, 'GetDepthStack'), 'FLIPON': (77, 0, 'SetAutoFlipOn'), 'EIF': (89, 0, 'EndIf'), 'DIV': (98, 0, 'Divide'), 'SHPIX': (56, 0, 'ShiftZoneByPixel'), 'DELTAP1': (93, 0, 'DeltaExceptionP1'), 'DELTAP3': (114, 0, 'DeltaExceptionP3'), 'DELTAP2': (113, 0, 'DeltaExceptionP2'), 'POP': (33, 0, 'PopTopStack'), 'SCFS': (72, 0, 'SetCoordFromStackFP'), 'LT': (80, 0, 'LessThan'), 'CALL': (43, 0, 'CallFunction'), 'AA': (127, 0, 'AdjustAngle'), 'MPPEM': (75, 0, 'MeasurePixelPerEm'), 'IP': (57, 0, 'InterpolatePts'), 'UTP': (41, 0, 'UnTouchPt'), 'ABS': (100, 0, 'Absolute'), 'IF': (88, 0, 'If'), 'SCANCTRL': (133, 0, 'ScanConversionControl'), 'CEILING': (103, 0, 'Ceiling'), 'SCANTYPE': (141, 0, 'ScanType'), 'GETINFO': (136, 0, 'GetInfo'), 'ALIGNRP': (60, 0, 'AlignRelativePt'), 'GFV': (13, 0, 'GetFVector'), 'RUTG': (124, 0, 'RoundUpToGrid'), 'SDB': (94, 0, 'SetDeltaBaseInGState'), 'ROLL': (138, 0, 'RollTopThreeStack')}, strip=<function strip>, binary2num=<function binary2num>)
_disassemble()