+
    f7i^.  c                   s$   ^ RI H t  ^ RIHtHtHtHtHt ^ RIHtH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHtHt ^ RIHtHt ^ R	IHt ^ R
IHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RItRR.t  ! R R4      t! ! R R]!]4      t" ! R R]!]]4      t#R# )    )array)AnyCallableDictOptionalTuple)MAX_F2DOT14floatToFixedToFloat)LogMixin)AbstractPointPenotRound)
LoggingPenPenError)TransformPenTransformPointPen)	ttProgram)flagOnCurve	flagCubic)Glyph)GlyphComponent)GlyphCoordinates)dropImpliedOnCurvePointsN
TTGlyphPenTTGlyphPointPenc                   s   a  ] tR t^t o RV 3R lR lltV 3R lR ltR tV 3R lR ltRV 3R	 lR
 lltR t	RR]
/V 3R lR llltRtV tR# )_TTGlyphBasePenc                sP   < V ^8  d   QhRS[ S[S[S[3,          ,          RS[RR/# )   glyphSethandleOverflowingTransformsreturnNr   r   strr   boolZformat__classdict__   "@/usr/lib64/python3.14/site-packages/fontTools/pens/ttGlyphPen.py__annotate___TTGlyphBasePen.__annotate__   s6     ! !4S>*! &*! 
	!    c                s>    Wn         W n        V P                  4        R# )a  
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.
N)r   r   init)selfr   r      &&&r%   __init__Z_TTGlyphBasePen.__init__   s    > !+F(		r(   c          
      sL   < V ^8  d   QhRS[ RS[S[S[S[S[S[S[3,          /# )r   	glyphNametransformation)r    r   floatr"   r$   r%   r&   r'   9   s5     A AA eUE5%FGAr(   c                s    V P                  W4      p\        V P                  V,          V P                  4      ! V4       R # N)transformPenZgetattrr   
drawMethod)r*   r-   r.   Ztpens   &&& r%   
_decomposeZ_TTGlyphBasePen._decompose9   s0    
   6i($//:4@r(   c                s    \         h)z&
Check if the current path is closed.
)ZNotImplementedErrorr*      &r%   	_isClosedZ_TTGlyphBasePen._isClosedA   s
     "!r(   c                   < V ^8  d   QhRR/# r   r   N r"   r$   r%   r&   r'   G   s      d r(   c                s>    . V n         . V n        . V n        . V n        R # r0   )pointsendPtstypes
componentsr4   r5   r%   r)   Z_TTGlyphBasePen.initG   s    
r(   Nc          
      sl   < V ^8  d   QhRS[ RS[S[S[S[S[S[S[3,          RS[S[ ,          RS[RR/# )r   baseGlyphNamer.   
identifierkwargsr   N)r    r   r/   r   r   r"   r$   r%   r&   r'   M   sZ     
@ 
@
@ eUE5%FG
@ SM	
@
 
@ 

@r(   c                s>    V P                   P                  W34       R# )z
Add a sub glyph.
N)r=   append)r*   r>   r.   r?   r@   s   &&&&,r%   addComponentZ_TTGlyphBasePen.addComponentM   s     	>?r(   c                s   V P                   '       dI   \        ;QJ d&    R  V P                   4       F  '       g   K   RM	  RM! R  V P                   4       4      p. pV P                   EF  w  rEW@P                  9  d"   V P                  P                  RV R24       K7  V P                  '       g   V P                   '       d   X'       d   V P                  WE4       Kv  \        4       pWFn	        R VR,           4       w  Vn
        Vn        \        ;QJ d    . R VR,           4       F  NK  	  5M! R VR,           4       4      pVR8w  d   V P                   '       dg   \        ;QJ d    R	 V 4       F  '       g   K   RM	  RM! R	 V 4       4      '       d-   \        ;QJ d    . R
 V 4       F  NK  	  5M! R
 V 4       4      pVR,          VR,          3Vn        Wn        VP                  V4       EK  	  V# )c              3   sj   "   T F)  w  rVR ,           F  pV^8  ;'       g    VR8  x  K  	  K+  	  R# 5i)N   NNir9   ).0r-   r.   ss   &   r%   	<genexpr>3_TTGlyphBasePen._buildComponents.<locals>.<genexpr>]   s?      3B/Y'++A AR+  3Bs   33TFz skipped non-existing component 'Z'c              3   s8   "   T F  p\        V4      x  K  	  R # 5ir0   r   rE   Zv   & r%   rG   rH   n   s     'O<Nq

<Ns   :rD   NNc              3   s:   "   T F  p\        V^4      x  K  	  R# 5i)i   N)r   rI   rJ   r%   rG   rH   q   s      #4Fq#Ar**4Fs   rC   c              3   sV   "   T F  p\         Tu;8  ;'       d    ^8*  Mu x  K!  	  R# 5ir   Nr   rE   rF   rJ   r%   rG   rH   u   s#      <2@QK!((q((.s   ))c              3   s^   "   T F#  p\         Tu;8  d   ^8:  d
   M M\         MTx  K%  	  R# 5irK   rL   rM   rJ   r%   rG   rH   y   s(      +!/A (3Q';!';B!/s   +-:Nr   N:r   NN)   r    r    rN   )r   Zanyr=   r   ZlogZwarningr:   r3   r   r-   ZxZyZtupleZ	transformflagsrA   )r*   componentFlagsZoverflowingr=   r-   r.   Z	components   &&     r%   _buildComponentsZ _TTGlyphBasePen._buildComponentsY   s   +++ # 37??### 37?? K
 
)-%I-  #CI;a!PQ{{{t???K	:&(I"+'ON2<N'O$IK #U #4B24F#UU #4B24F# N -333 <2@< <2@< 9 9 &+U +!/+UU +!/+ &N (6b'9>";M&N	#,Oi(9 *9: r(   roundc                sJ   < V ^8  d   QhRS[ RS[RS[S[.S[ 3,          RS[/# )r   rP   dropImpliedOnCurvesrR   r   )intr!   r   r/   r   r"   r$   r%   r&   r'      s>     & && "&
 %& 
&r(   c               sT   V P                  4       '       g   \        R4      hV P                  V4      p\        4       p\	        V P
                  4      Vn        V P                  Vn        \        RV P                  4      Vn        V P                  4        V'       d   WEn        RVn        V# \        VP                  4      Vn        \         P"                  ! 4       Vn        VP$                  P'                  R4       V'       d   \)        V4       VP                  P+                  VR7       V# )z
Returns a :py:class:`~._g_l_y_f.Glyph` object representing the glyph.

Args:
    componentFlags: Flags to use for component glyphs. (default: 0x04)

    dropImpliedOnCurves: Whether to remove implied-oncurve points. (default: False)
zDidn't close last contour.ZBr(   )rR   )r6   r   rQ   r   r   r:   Zcoordinatesr;   ZendPtsOfContoursr   r<   rO   r)   r=   ZnumberOfContourslenr   ZProgramZprogramZfromBytecoder   ZtoInt)r*   rP   rS   rR   r=   glyphs   &&&$  r%   rW   Z_TTGlyphBasePen.glyph   s     ~~788**>:
,T[[9!%C,		  *%'E"  &))?)?%@E"%--/EMMM&&s+"(/##%#0r(   )r=   r;   r   r   r:   r<   )Tr0   )rD   F)__name__
__module____qualname____firstlineno__r,   r3   r6   r)   rB   rQ   r   rW   __static_attributes____classdictcell__)r#   s   @r%   r   r      sV     ! !FA A" 
@ 
@'R&
 )0& & &r(   r   c                   s   a a ] tR t^t oRtRt]tRV3R lV 3R llltV3R lR lt	V3R lR lt
V3R	 lR
 ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltRtVtV ;t# )r   z
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 :py:class:`~._g_l_y_f.Glyph` object representing the glyph.
Zdrawc                sV   < V ^8  d   QhRS[ S[S[S[3,          ,          RS[RS[RR/# )r   r   r   outputImpliedClosingLiner   Nr   r"   r$   r%   r&   TTGlyphPen.__annotate__   sF     A A4S>*A &*A #'	A
 
Ar(   c                s2   < \         SV `  W4       W0n        R # r0   )superr,   r^   )r*   r   r   r^   	__class__s   &&&&r%   r,   ZTTGlyphPen.__init__   s     	?(@%r(   c                s@   < V ^8  d   QhRS[ S[S[3,          RS[RR/# )r   pttpr   N)r   r/   rT   r"   r$   r%   r&   r_      s+      E%,/ S T r(   c                sr    V P                   P                  V4       V P                  P                  V4       R # r0   )r:   rA   r<   )r*   rb   rc   r+   r%   	_addPointZTTGlyphPen._addPoint   s&    2

"r(   c                r7   r8   r9   r"   r$   r%   r&   r_      s      4 r(   c                sn    V P                   P                  4        V P                  P                  4        R # r0   )r:   Zpopr<   r4   r5   r%   	_popPointZTTGlyphPen._popPoint   s    

r(   c                    < V ^8  d   QhRS[ /# r   r   r!   r"   r$   r%   r&   r_      s     
 
4 
r(   c                s    V P                   '       * ;'       gE    V P                  ;'       d1    V P                  R,          \        V P                   4      ^,
          8H  # )rN   rU   )r:   r;   rV   r4   r5   r%   r6   ZTTGlyphPen._isClosed   sD    KK 
 
KKCCDKKOs4;;/?!/CC	
r(   c                :   < V ^8  d   QhRS[ S[S[3,          RR/# r   rb   r   Nr   r/   r"   r$   r%   r&   r_      s$     ( (ue|, ( (r(   c                s2    V P                  V\        4       R # r0   )rd   r   r*   rb      &&r%   lineToZTTGlyphPen.lineTo   s    r;'r(   c                ri   rj   rk   r"   r$   r%   r&   r_      s$     ( (ue|, ( (r(   c                st    V P                  4       '       g   \        R 4      hV P                  V\        4       R# )z+"move"-type point must begin a new contour.N)r6   r   rd   r   rl   rm   r%   moveToZTTGlyphPen.moveTo   s)    ~~HIIr;'r(   c                r7   r8   r9   r"   r$   r%   r&   r_      s     * *$ *r(   c                s    \        V4      ^,          ^8X  g   Q hVRR  F  pV P                  V\        4       K  	  VR,          e   V P                  VR,          ^4       R# R# )r   NrU   )rV   rd   r   r*   r:   rb      &* r%   curveToZTTGlyphPen.curveTo   sY    6{Q!###"+BNN2y)  ":!NN6":q) "r(   c                r7   r8   r9   r"   r$   r%   r&   r_      s     * *4 *r(   c                s    \        V4      ^8  g   Q hVRR  F  pV P                  V^ 4       K  	  VR,          e   V P                  VR,          ^4       R# R# rN   NrU   )rV   rd   rp   rq   r%   qCurveToZTTGlyphPen.qCurveTo   sU    6{a"+BNN2q!  ":!NN6":q) "r(   c                r7   r8   r9   r"   r$   r%   r&   r_      s     " "4 "r(   c                s
   \        V P                  4      ^,
          pV^ 8X  g1   V P                  '       d1   WP                  R,          ^,           8X  d   V P                  4        R# V P                  '       gq   ^ pV P                  '       d   V P                  R,          ^,           pV P                  V,          V P                  V,          8X  d   V P                  4        V^,          pV P                  P                  V4       R# rs   )rV   r:   r;   re   r^   rA   )r*   ZendPtZstartPts   &  r%   	closePathZTTGlyphPen.closePath   s    DKK 1$ A:$+++%;;r?Q3F*FNN,,,G{{{++b/A-{{7#t{{5'99 
5!r(   c                r7   r8   r9   r"   r$   r%   r&   r_      s       r(   c                s&    V P                  4        R # r0   )ru   r4   r5   r%   endPathZTTGlyphPen.endPath   s    r(   )r^   )NTF)rX   rY   rZ   r[   __doc__r2   r   r1   r,   rd   re   r6   rn   ro   rr   rt   ru   rv   r\   r]   __classcell__ra   r#      @@r%   r   r      s      JLA A  
 

( (( (
* ** *" "&  r(   c                   s   a a ] tR t^t oRtRt]tV3R lV 3R lltV3R lR lt	RV3R lR llt
V3R	 lR
 ltRV3R lR lltRtVtV ;t# )r   a  
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 :py:class:`~._g_l_y_f.Glyph` object representing the glyph.
Z
drawPointsc                r7   r8   r9   r"   r$   r%   r&   TTGlyphPointPen.__annotate__  s     . .d .r(   c                s2   < \         SV `  4        R V n        R # r0   )r`   r)   _currentContourStartIndex)r*   ra   s   &r%   r)   ZTTGlyphPointPen.init  s    )-&r(   c                rf   rg   rh   r"   r$   r%   r&   r{     s     6 64 6r(   c                s    V P                   R J # r0   r|   r4   r5   r%   r6   ZTTGlyphPointPen._isClosed  s    --55r(   c                s:   < V ^8  d   QhRS[ S[,          RS[RR/# )r   r?   r@   r   N)r   r    r   r"   r$   r%   r&   r{     s&     : :HSM :C :D :r(   c                s|    V P                  4       '       g   \        R4      h\        V P                  4      V n        R# )z
Start a new sub path.
zDidn't close previous contour.N)r6   r   rV   r:   r|   )r*   r?   r@   s   &&,r%   	beginPathZTTGlyphPointPen.beginPath  s.     ~~;<<),T[[)9&r(   c                r7   r8   r9   r"   r$   r%   r&   r{     s     ' ' 'r(   c                sv   V P                  4       '       d   \        R4      hV P                  \        V P                  4      8X  d
   RV n        R# V P
                  '       d   V P
                  R,          ^,           M^ pV P
                  P                  \        V P                  4      ^,
          4       RV n        V P                  p\        V\        V4      4       F[  pW#,          R8X  g   K  V^,
          pWA8  d   \        V4      ^,
          pW$,          ^ 8X  d   \        W$&   V^,          pK   \        W#&   K]  	  R# )z
End the current sub path.
zContour is already closed.NcurverU   )r6   r   r|   rV   r:   r;   rA   r<   Zranger   r   )r*   ZcontourStartrO   ZiZjs   &    r%   rv   ZTTGlyphPointPen.endPath  s    
 >>788))S-==-1D*.2kkkt{{2*q3t{{+a/0)-& 

|SZ0Ax7"E#E
QAh!m(EHFA& 1r(   c                s   < V ^8  d   QhRS[ S[S[3,          RS[S[,          RS[RS[S[,          RS[S[,          RS[RR/# )	r   rb   segmentTypesmoothnamer?   r@   r   N)r   r/   r   r    r!   r   r"   r$   r%   r&   r{   6  sf      %, c] 	
 sm SM  
r(   c                s   V P                  4       '       d   \        R4      hVf   V P                  P                  ^ 4       M|VR9   d!   V P                  P                  \        4       MUVR8X  d!   V P                  P                  \        4       M.VR8X  d   V P                  P                  R4       M\        V4      hV P                  P                  V4       R# )z&
Add a point to the current sub path.
z&Can't add a point to a closed contour.NZqcurver   )ZlineZmove)r6   r   r<   rA   r   ZAssertionErrorr:   )r*   rb   r   r   r   r?   r@   s   &&&&&&,r%   addPointZTTGlyphPointPen.addPoint6  s     >>CDDJJa ,,JJk*H$JJk*G#JJg& --2r(   r}   r0   )NFNN)rX   rY   rZ   r[   rw   r2   r   r1   r)   r6   r~   rv   r   r\   r]   rx   ry   rz   r%   r   r      sM      J$L. .6 6: :' '8  r(   )$r   Ztypingr   r   r   r   r   ZfontTools.misc.fixedToolsr   r   ZfontTools.misc.loggingToolsr	   ZfontTools.pens.pointPenr
   ZfontTools.misc.roundToolsr   ZfontTools.pens.basePenr   r   ZfontTools.pens.transformPenr   r   ZfontTools.ttLib.tablesr   ZfontTools.ttLib.tables._g_l_y_fr   r   r   r   r   r   ZmathZ__all__r   r   r   r9   r(   r%   <module>r      ss     7 7 F 0 4 - 7 G , B 1 : < D  *
+S SlQ* QhPox1A Pr(   