ttGlyphPen

class fontTools.pens.ttGlyphPen.TTGlyphPen(glyphSet: Dict[str, Any] | None = None, handleOverflowingTransforms: bool = True, outputImpliedClosingLine: bool = False)[source]

Bases: _TTGlyphBasePen, LoggingPen

Pen used for drawing to a TrueType glyph.

This pen can be used to construct or modify glyphs in a TrueType format font. After using the pen to draw, use the .glyph() method to retrieve a Glyph object representing the glyph.

drawMethod = 'draw'
transformPen

alias of TransformPen

lineTo(pt: Tuple[float, float]) None[source]
moveTo(pt: Tuple[float, float]) None[source]
curveTo(*points) None[source]
qCurveTo(*points) None[source]
closePath() None[source]
endPath() None[source]
class fontTools.pens.ttGlyphPen.TTGlyphPointPen(glyphSet: Dict[str, Any] | None, handleOverflowingTransforms: bool = True)[source]

Bases: _TTGlyphBasePen, LogMixin, AbstractPointPen

Point pen used for drawing to a TrueType glyph.

This pen can be used to construct or modify glyphs in a TrueType format font. After using the pen to draw, use the .glyph() method to retrieve a Glyph object representing the glyph.

drawMethod = 'drawPoints'
transformPen

alias of TransformPointPen

init() None[source]
beginPath(identifier: str | None = None, **kwargs: Any) None[source]

Start a new sub path.

endPath() None[source]

End the current sub path.

addPoint(pt: Tuple[float, float], segmentType: str | None = None, smooth: bool = False, name: str | None = None, identifier: str | None = None, **kwargs: Any) None[source]

Add a point to the current sub path.