Skip to content

fontlabapp.vfjo.nodes.Node · declarations 001

Back to fontlabapp.vfjo.nodes.Node

__str__ class-attribute instance-attribute

__str__

attrs class-attribute instance-attribute

attrs: str | None

close class-attribute instance-attribute

close: bool

flags class-attribute instance-attribute

flags: tuple[str, ...]

format

format() -> str

Return the node string (exact for an unmodified parsed node).

g2 class-attribute instance-attribute

g2: bool

mapped

mapped(fn: Callable[[Number, Number], Point]) -> Node

Return a new node with every point replaced by fn(x, y).

moved

moved(dx: Number, dy: Number) -> Node

Return a new node translated by (dx, dy).

name property

name: str | None

The node name from n:'...' in the attributes, else None.

offcurve class-attribute instance-attribute

offcurve: bool

offcurves property

offcurves: list[Point]

The off-curve points: all for close/o nodes, else all but the last.

on property

on: Point | None

The on-curve point; None for a closing node or a TrueType off-curve.

parse classmethod

parse(text: str) -> Node

Parse a node string; raise ValueError (with the text) if malformed.

scaled

scaled(sx: Number, sy: Number | None = None, origin: Point = (0, 0)) -> Node

Return a new node scaled by sx/sy (default sx) around origin.