vfbLib.vfb.pens.VfbGlyphPointPen

class vfbLib.vfb.pens.VfbGlyphPointPen(glyph: VfbGlyph | VfbGlyphMaster, glyphSet: Vfb)

Bases: AbstractPointPen

__init__(glyph: VfbGlyph | VfbGlyphMaster, glyphSet: Vfb) None

A PointPen to draw into the VFB glyph.

Parameters:

glyph (VfbGlyph) – The glyph to draw into.

Methods

__init__(glyph, glyphSet)

A PointPen to draw into the VFB glyph.

addComponent(baseGlyphName, transformation)

Add a sub glyph.

addPoint(pt[, segmentType, smooth, name])

Add a point to the current sub path.

addVarComponent(glyphName, transformation, ...)

Add a VarComponent sub glyph.

beginPath()

Start a new sub path.

endPath()

End the current sub path.

addComponent(baseGlyphName: str, transformation: tuple[float, float, float, float, float, float], identifier: str | None = None, **kwargs: Any) None

Add a sub glyph.

addPoint(pt: tuple[int, int], segmentType: str | None = None, smooth: bool = False, name: str | None = None, **kwargs: dict[str, Any]) None

Add a point to the current sub path.

addVarComponent(glyphName: str, transformation: DecomposedTransform, location: Dict[str, float], identifier: str | None = None, **kwargs: Any) None

Add a VarComponent sub glyph. The ‘transformation’ argument must be a DecomposedTransform from the fontTools.misc.transform module, and the ‘location’ argument must be a dictionary mapping axis tags to their locations.

beginPath() None

Start a new sub path.

endPath() None

End the current sub path.