Skip to content

fontlab.flNode · declarations 002

Back to fontlab.flNode

makeStart

makeStart() -> bool

bool makeStart()

Designates this node as the first node (start point) of its contour. The starting node determines where drawing begins and can affect some export and compatibility operations. Returns True on success.

Source: FontLab Proteus API documentation

moveBy

moveBy(*args: Any, **kwargs: Any) -> Any

moveBy(float dx, float dy[, bool round=false]

Shifts the node by dx units horizontally and dy units vertically. Pass round=True to snap the result to integer coordinates, which is useful when cleaning up outlines for hinting.

Source: FontLab Proteus API documentation

nextNode

nextNode(nodeType: Any = ...) -> Any

Node/None nextNode([string nodeType= [, int searchDepth=1]])

Returns the next node in the contour after this one. If nodeType is provided (e.g. 'on' or 'off'), it skips forward until it finds a node of that type. searchDepth limits how many nodes to scan. Returns None if no match is found.

Source: FontLab Proteus API documentation

nodeState instance-attribute

nodeState: Any

nodeState

A combined state value encoding both the node's type and kind flags. Can be read as a raw integer or as a (NodeType, NodeKind) tuple. Mainly useful for low-level state serialization.

Source: FontLab Proteus API documentation

pointG2

pointG2() -> Any

QPointF/None pointG2()

Returns the ideal G2-continuous position for this node's handle as a QPointF, or None if G2 cannot be computed. You can use this to "snap" handles to their G2-optimal locations.

Source: FontLab Proteus API documentation

position instance-attribute

position: Any

Coordinates of the node as QPointF

A convenience property that gets or sets both x and y at once as a QPointF object. Equivalent to reading/writing both coordinates in one step.

Source: FontLab Proteus API documentation

prevNode

prevNode(nodeType: Any = ...) -> Any

Node/None prevNode([string nodeType= [, int searchDepth=1]])

Same as nextNode but travels backward through the contour. Handy for finding the incoming handle of a curve segment.

Source: FontLab Proteus API documentation

preview instance-attribute

preview: Any

preview

Flags this node for preview highlighting in the glyph editor. Mainly used by FontLab's internal tools to highlight nodes during interactive operations.

Source: FontLab Proteus API documentation

rotateBy

rotateBy(origin: Any = ...) -> Any

rotateBy(valueDegree[, QPointF origin=(0, 0)])

Rotates the node around an optional center point. Positive angles rotate counter-clockwise (standard math convention).

Source: FontLab Proteus API documentation

round

round() -> Any

round() - Round the node's coordinate

Rounds the node's x and y coordinates to the nearest integer. This is important for font hinting, which requires integer coordinates to work correctly.

Source: FontLab Proteus API documentation

scaleBy

scaleBy(origin: Any = ...) -> Any

scaleBy(valueXY | (valueX, valueY)[, QPointF origin=(0, 0)])

Scales the node's position relative to an optional origin point. If no origin is given, scaling is relative to (0, 0).

Source: FontLab Proteus API documentation

scv instance-attribute

scv: Any

scv

"Smooth Curve Vector" flag. When True, this node participates in FontLab's SCV curve-quality system.

Source: FontLab Proteus API documentation

selected instance-attribute

selected: Any

The selected flag

True if this node is currently selected in the glyph editor. Scripts can set this to programmatically select specific nodes before performing an operation.

Source: FontLab Proteus API documentation

setExtraLast

setExtraLast(bool: Any) -> Any

setExtraLast(bool)

Marks or unmarks this node as an "extra last" node, which is an internal flag used in some open-contour operations.

Source: FontLab Proteus API documentation

setNextSmooth

setNextSmooth(base: QPointF) -> Any

setNextSmooth(QPointF base)

Sets the position of the outgoing handle such that it maintains smooth continuity with the incoming handle direction.

Source: FontLab Proteus API documentation

setPrevSmooth

setPrevSmooth(base: QPointF) -> Any

setPrevSmooth(QPointF base)

Sets the position of the incoming handle such that it maintains smooth continuity with the outgoing handle direction.

Source: FontLab Proteus API documentation

setSmartAngleEnbl

setSmartAngleEnbl(bool: Any) -> bool

bool setSmartAngleEnbl(bool)

Enables or disables the Smart Angle feature on this node.

Source: FontLab Proteus API documentation

setSmartSharp

setSmartSharp(tension: Any = ...) -> bool

bool setSmartSharp([double tension = 0.6])

Sets up this node as a "smart sharp" point — a node type that blends between a corner and smooth depending on tension. Returns True if the setup was successful.

Source: FontLab Proteus API documentation

skewBy

skewBy(origin: Any = ...) -> Any

skewBy(valueDegreeX | (valueDegreX, valueDegreY)[, QPointF origin=(0, 0)])

Skews (shears) the node's position. Useful for creating oblique or italic variants programmatically.

Source: FontLab Proteus API documentation

smartAngleR instance-attribute

smartAngleR: Any

smartAngleR

The radius parameter for the Smart Angle feature. Larger values give the smart angle more influence over a wider range of the design space.

Source: FontLab Proteus API documentation

smartMove

smartMove(offset: Any) -> Any

list(uint) smartMove(offset)

Moves this node while preserving smooth continuity with neighboring nodes — the adjacent handles are automatically adjusted to maintain their angles. Returns a list of node indices that were affected.

Source: FontLab Proteus API documentation

smartSetXY

smartSetXY(arg0: QPointF) -> Any

smartSetXY(QPointF)

Moves this node to the given position while intelligently updating neighboring handles to preserve curve quality, similar to dragging a node in the editor.

Source: FontLab Proteus API documentation

smooth instance-attribute

smooth: Any

The smooth flag

True if this is a smooth (tangent-continuous) node, False if it's a corner. Setting smooth = True forces the handles to be collinear and creates the rounded, flowing transitions typical of professional type design.

Source: FontLab Proteus API documentation

state instance-attribute

state: Any

state

A raw integer encoding all of the node's flags. Useful for debugging or for comparing node states at a low level.

Source: FontLab Proteus API documentation

transformBy

transformBy(origin: Any = ...) -> Any

transformBy(QTransform tx[, QPointF origin=(0, 0)])

Applies a full affine transformation matrix (QTransform) to the node's position. Use this when you need to apply the same rotation or shear you've calculated for a whole glyph to a single point.

Source: FontLab Proteus API documentation

type instance-attribute

type: Any

The node type

The node's type: On (on-curve), Off (off-curve handle), or Curve (on-curve in a curve segment). Reading this tells you what role the node plays; setting it changes the node's role. See NodeType enum below.

Source: FontLab Proteus API documentation

updateG2

updateG2() -> bool

bool updateG2()

Recalculates and updates the G2-continuity state for this node. Call this after manually moving handles to see if the node qualifies for G2. Returns True if the state changed.

Source: FontLab Proteus API documentation

updateSmooth

updateSmooth(extended_neibh: Any = ...) -> Any

updateSmooth([bool extended_neibh=true])

Recomputes the smooth constraint for this node, enforcing that its handles remain collinear. Pass extended=True to also propagate the update to neighboring nodes.

Source: FontLab Proteus API documentation

x instance-attribute

x: Any

The x coordinate of the node

The node's horizontal position in em units. Setting this directly moves the node on the x-axis without affecting any neighbors.

Source: FontLab Proteus API documentation

y instance-attribute

y: Any

The y coordinate of the node

The node's vertical position in em units, measured upward from the baseline.

Source: FontLab Proteus API documentation