# t2CharStringPen

class fontTools.pens.t2CharStringPen.T2CharStringPen(width: float | None, glyphSet: Dict[str, Any] | None, roundTolerance: float = 0.5, CFF2: bool = False)

  Bases: `BasePen`

  Pen to draw Type 2 CharStrings.

  The ‘roundTolerance’ argument controls the rounding of point coordinates. It is defined as the maximum absolute difference between the original float and the rounded integer value. The default tolerance of 0.5 means that all floats are rounded to integer; a value of 0 disables rounding; values in between will only round floats which are close to their integral part within the tolerated range.

  getCharString(private: Dict | None = None, globalSubrs: List | None = None, optimize: bool = True) → T2CharString