docstr: Construct a new pen.
  
  Args:
      glyphSet (Dict[str, Any]): A glyphset object, used to resolve components.
      handleOverflowingTransforms (bool): See below.
  
  If ``handleOverflowingTransforms`` is True, the components' transform values
  are checked that they don't overflow the limits of a F2Dot14 number:
  -2.0 <= v < +2.0. If any transform value exceeds these, the composite
  glyph is decomposed.
  
  An exception to this rule is done for values that are very close to +2.0
  (both for consistency with the -2.0 case, and for the relative frequency
  these occur in real fonts). When almost +2.0 values occur (and all other
  values are within the range -2.0 <= x <= +2.0), they are clamped to the
  maximum positive value that can still be encoded as an F2Dot14: i.e.
  1.99993896484375.
  
  If False, no check is done and all components are translated unmodified
  into the glyf table, followed by an inevitable ``struct.error`` once an
  attempt is made to compile them.
  
  If both contours and components are present in a glyph, the components
  are decomposed.
docstr_tok: ["Construct","a","new","pen",".","Args",":","glyphSet","(","Dict","[","str",",","Any","]",")",":","A","glyphset","object",",","used","to","resolve","components",".","handleOverflowingTransforms","(","bool",")",":","See","below",".","If","``","handleOverflowingTransforms","``","is","True",",","the","components","'","transform","values","are","checked","that","they","do","n't","overflow","the","limits","of","a","F2Dot14","number",":","-2.0","<","=","v","<","+2.0",".","If","any","transform","value","exceeds","these",",","the","composite","glyph","is","decomposed",".","An","exception","to","this","rule","is","done","for","values","that","are","very","close","to","+2.0","(","both","for","consistency","with","the","-2.0","case",",","and","for","the","relative","frequency","these","occur","in","real","fonts",")",".","When","almost","+2.0","values","occur","(","and","all","other","values","are","within","the","range","-2.0","<","=","x","<","=","+2.0",")",",","they","are","clamped","to","the","maximum","positive","value","that","can","still","be","encoded","as","an","F2Dot14",":","i.e",".","1.99993896484375",".","If","False",",","no","check","is","done","and","all","components","are","translated","unmodified","into","the","glyf","table",",","followed","by","an","inevitable","``","struct.error","``","once","an","attempt","is","made","to","compile","them",".","If","both","contours","and","components","are","present","in","a","glyph",",","the","components","are","decomposed","."]
code: def __init__(
      self,
      glyphSet: Optional[Dict[str, Any]],
      handleOverflowingTransforms: bool = True,
  ) -> None:
      """
      Construct a new pen.
  
      Args:
          glyphSet (Dict[str, Any]): A glyphset object, used to resolve components.
          handleOverflowingTransforms (bool): See below.
  
      If ``handleOverflowingTransforms`` is True, the components' transform values
      are checked that they don't overflow the limits of a F2Dot14 number:
      -2.0 <= v < +2.0. If any transform value exceeds these, the composite
      glyph is decomposed.
  
      An exception to this rule is done for values that are very close to +2.0
      (both for consistency with the -2.0 case, and for the relative frequency
      these occur in real fonts). When almost +2.0 values occur (and all other
      values are within the range -2.0 <= x <= +2.0), they are clamped to the
      maximum positive value that can still be encoded as an F2Dot14: i.e.
      1.99993896484375.
  
      If False, no check is done and all components are translated unmodified
      into the glyf table, followed by an inevitable ``struct.error`` once an
      attempt is made to compile them.
  
      If both contours and components are present in a glyph, the components
      are decomposed.
      """
      self.glyphSet = glyphSet
      self.handleOverflowingTransforms = handleOverflowingTransforms
      self.init()
  
imports: from array import array
  from typing import Any, Callable, Dict, Optional, Tuple
  from fontTools.misc.fixedTools import MAX_F2DOT14, floatToFixedToFloat
  from fontTools.misc.loggingTools import LogMixin
  from fontTools.pens.pointPen import AbstractPointPen
  from fontTools.misc.roundTools import otRound
  from fontTools.pens.basePen import LoggingPen, PenError
  from fontTools.pens.transformPen import TransformPen, TransformPointPen
  from fontTools.ttLib.tables import ttProgram
  from fontTools.ttLib.tables._g_l_y_f import flagOnCurve, flagCubic
  from fontTools.ttLib.tables._g_l_y_f import Glyph
  from fontTools.ttLib.tables._g_l_y_f import GlyphComponent
  from fontTools.ttLib.tables._g_l_y_f import GlyphCoordinates
  from fontTools.ttLib.tables._g_l_y_f import dropImpliedOnCurvePoints
  import math
label_desc: Use image node_id 1 to create a new _TTGlyphBasePen object  with example: obj = _TTGlyphBasePen(glyphSet, handleOverflowingTransforms)