Skip to content

fontlab.flTTHCommand · declarations 001

Back to fontlab.flTTHCommand

code instance-attribute

code: Any

int

The instruction opcode identifying what kind of hinting command this is. Common codes: Align, Single Link, Double Link, Interpolate, Delta, Final Delta. The exact numeric values are defined in FontLab's TT hinting engine.

Source: FontLab Proteus API documentation

fromString

fromString(arg0: str, itr: Any) -> bool

bool fromString(QString, itr)

Deserialises this command from its string representation. Used for loading hint programs from UFO or other serialised formats. Returns True on success.

Source: FontLab Proteus API documentation

isDelta

isDelta() -> bool

bool isDelta()

Returns True if this is a Delta instruction — a fine manual correction applied at one or more specific PPEM sizes. Deltas are the most common type of manual TT hinting adjustment, used to fix specific rendering problems at particular sizes.

Source: FontLab Proteus API documentation

isFinal

isFinal() -> bool

bool isFinal()

Returns True if this is a Final Delta — a delta applied in the final pass of the hint program, after all other hints have already been executed. Final deltas are used for corrections that depend on the outcome of earlier instructions.

Source: FontLab Proteus API documentation

isHorizontal

isHorizontal() -> bool

bool isHorizontal()

Returns True if this instruction operates in the horizontal direction — snapping to x-axis features like stem widths and sidebearing references.

Source: FontLab Proteus API documentation

isVertical

isVertical() -> bool

bool isVertical()

Returns True if this instruction operates in the vertical direction — snapping to y-axis features like zone boundaries, stem heights, and cap heights. Most alignment instructions are vertical.

Source: FontLab Proteus API documentation

nodesCount

nodesCount() -> int

int nodesCount()

Returns the number of point names involved in this instruction. An Align command has 1 point; a Single Link has 2 points; a Double Link has 3.

Source: FontLab Proteus API documentation

parameters instance-attribute

parameters: Any

QList

Additional parameters. For a Delta, this is a list of [ppem, value] pairs specifying the correction at each pixel size. For a link command, this may include the stem or zone index.

Source: FontLab Proteus API documentation

parametersCount

parametersCount() -> int

int parametersCount()

Returns the number of additional parameters for this command. For a Delta, this is the number of PPEM/correction-value pairs. For a link command, this is typically 0 or 1 (the stem index).

Source: FontLab Proteus API documentation

point_names instance-attribute

point_names: Any

QList

The names of the points (nodes) this instruction applies to. Point names in TT hinting correspond to the name property you set on individual nodes in the glyph editor. For example, an Align command might use ["@top"] and a Single Link might use ["@left", "@right"].

Source: FontLab Proteus API documentation

stemIndex

stemIndex() -> int

int stemIndex()

Returns the index of the stem this instruction references, or -1 if not stem-related. Use with layer.stems to retrieve the specific flStem object.

Source: FontLab Proteus API documentation

zoneIndex

zoneIndex() -> int

int zoneIndex()

Returns the index of the alignment zone this instruction references, or -1 if not zone-related. Use this with layer.zones to retrieve the specific flZone object.

Source: FontLab Proteus API documentation