+
    f7iDD  c                   s   R t ^ RIHtHt ^ RIHt ^ RIHt ^ RIHtH	t	 ^ RI
Ht ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHtHt ^ R
IHtHt ^ RIHtHtHt  ! R R]4      t ! R R]4      t ! R R]4      t  ! R R]4      t! ! R R]4      t" ! R R]"4      t# ! R R]"4      t$R t% ! R R]"4      t&RR/R lt' ! R  R!]4      t( ! R" R#4      t)R$# )%zGlyphSets returned by a TTFont.)ABCabstractmethod)Mapping)contextmanager)copydeepcopy)SimpleNamespace)Vector)otRoundfixedToFloat)deprecateFunction)	TransformDecomposedTransform)TransformPenTransformPointPen)DecomposingRecordingPenlerpRecordingsreplayRecordingc                   s   a  ] tR t^t o RtRR/R lt]V 3R lR l4       t]R 4       tR t	R	 t
R
 t]! R]R7      R 4       tRtV tR# )_TTGlyphSetzdGeneric dict-like GlyphSet class that pulls metrics from hmtx and
glyph shape from TrueType or CFF.
recalcBoundsTc               s   W@n         Wn        R V P                  9   d8   V P                  R ,          P                   Uu/ uF  qUP                  ^ bK  	  upM/ V n        Ve   TM/ V n        / V n        Ve   TM/ V n        ^ V n        . V n	        . V n
        W0n        VR,          P                  V n        \        VP                  R4      RR4      V n        RV n        V'       dn   ^ RIHp \        VP                  R4      RR4      V n        V P"                  e7   V! V P"                  P(                  VR ,          P                  V4      V n        R# R# R# u upi )fvarNZhmtxZvmtxmetricsVarStoreInstancerZHVARtable)r   fontaxesaxisTagdefaultLocationNormalizedlocationrawLocationoriginalLocationdepthlocationStackrawLocationStackglyphsMappingr   hMetricsgetattrgetvMetrics	hvarTablefontTools.varLib.varStorer   ZVarStorehvarInstancer)selfr   r   r#   r   Zaxisr   s   &&&&$  A/usr/lib64/python3.14/site-packages/fontTools/ttLib/ttGlyphSet.py__init__Z_TTGlyphSet.__init__   s'   (	 " *.6):)?)?@)?\\1_)?@ 	&
 %-$8b,4,@b
 "*V,, 0)TBC$TXXf%5wEDN~~)%6NN++T&\->->&" *	  As   Ec                    < V ^8  d   QhRS[ /# i   resetZboolZformat__classdict__   "r,   __annotate__Z_TTGlyphSet.__annotate__6   s     ; ;D ;    c              #  s  "   V P                   P                  V P                  4       V P                  P                  V P                  4       V'       d@   V P
                  P                  4       V n        V P                  P                  4       V n        M&V P                  P                  4       V n        / V n        V P                  P                  V4       V P                  P                  V4        R x  V P                   P                  4       V n        V P                  P                  4       V n        R #   T P                   P                  4       T n        T P                  P                  4       T n        i ; i5iN)
r!   Zappendr   r"   r   r   r   r   ZupdateZpop)r+   r   r0      &&&r,   pushLocationZ_TTGlyphSet.pushLocation5   s    !!$--0$$T%5%56 11668DM#==BBDD MM..0DM!DX&)	;J ..224DM#4488:D !..224DM#4488:Ds    C.E81D5 5A E85A E55E8c              #  s   "    V P                   pV ;P                   ^,          un         Vx  V ;P                   ^,          un         R#   T ;P                   ^,          un         i ; i5i)   N)r    )r+   r    s   & r,   	pushDepthZ_TTGlyphSet.pushDepthH   s?     	JJEJJ!OJKJJ!OJDJJ!OJs   A&)A A&A##A&c                    WP                   9   # r7   r#   r+   	glyphName   &&r,   __contains__Z_TTGlyphSet.__contains__Q   s    ....r6   c                sH    \        V P                  P                  4       4      # r7   )iterr#   Zkeysr+      &r,   __iter__Z_TTGlyphSet.__iter__T   s    D&&++-..r6   c                s,    \        V P                  4      # r7   )lenr#   rC   rD   r,   __len__Z_TTGlyphSet.__len__W   s    4%%&&r6   z#use 'glyphName in glyphSet' instead)Zcategoryc                r<   r7   r=   r>   r@   r,   has_keyZ_TTGlyphSet.has_keyZ   s     ....r6   )r   r    r   r#   r$   r*   r(   r   r!   r   r   r"   r   r'   N)__name__
__module____qualname____firstlineno____doc__r-   r   r9   r;   rA   rE   rG   r
   ZDeprecationWarningrH   __static_attributes____classdictcell__r3      @r,   r   r      sl     d 8 ; ;$  //' -8J//r6   r   c                   s<   a a ] tR t^at oRV 3R lltR tRtVtV ;t# )_TTGlyphSetGlyfc                s   < VR ,          V n         \        SV `	  WV P                   VR7       VP                  R4      V n        R# )Zglyfr   ZgvarN)	glyfTablesuperr-   r&   	gvarTable)r+   r   r   r   	__class__   &&&&r,   r-   Z_TTGlyphSetGlyf.__init__b   s6    flS&)r6   c                s0    \        WV P                  R 7      # )rS   )_TTGlyphGlyfr   r>   r@   r,   __getitem__Z_TTGlyphSetGlyf.__getitem__g   s    D$:K:KLLr6   )rT   rV   )T	rI   rJ   rK   rL   r-   rZ   rN   rO   __classcell__rW   r3      @@r,   rR   rR   a   s     *
M Mr6   rR   c                   sZ   a a ] tR t^kt oV 3R ltR tR t]V3R lR l4       tRt	Vt
V ;t# )_TTGlyphSetCFFc                s   < R V9   d   R MRp\        W,          P                  P                  4       4      ^ ,          P                  V n        \
        SV `  WV P                  4       V P                  V4       R# )ZCFF2zCFF N)listZcffZvaluesZCharStringscharStringsrU   r-   setLocation)r+   r   r   ZtableTagrW   s   &&& r,   r-   Z_TTGlyphSetCFF.__init__l   s\    #t^6 2 2 9 9 ;<Q?KK)9)9:"r6   c                s    \        W4      # r7   )_TTGlyphCFFr>   r@   r,   rZ   Z_TTGlyphSetCFF.__getitem__r   s    4++r6   c                s    R V n         V'       df   ^ RIHp \        V P                  RR 4      pVeC   V! VP
                  V P                  R,          P                  V4      pVP                  V n         R # R # R V n         R # )Nr   varStorer   )	blenderr)   r   r%   ra   Z
otVarStorer   r   ZinterpolateFromDeltas)r+   r   r   rd   	instancer   &&   r,   rb   Z_TTGlyphSetCFF.setLocationu   so     Dt//TBH#-''6):)?)?	  )>>	 $  DLr6   c                r.   r/   r1   r2   r4   r,   r5   Z_TTGlyphSetCFF.__annotate__   s     0 0D 0r6   c              #  s(  "   V P                  V4       \        P                  WV4      ;_uu_ 4       p Vx  V P                  V P                  4        R R R 4       R #   T P                  T P                  4       i ; i  + '       g   i     R # ; i5ir7   )rb   r   r9   r   )r+   r   r0   values   &&& r,   r9   Z_TTGlyphSetCFF.pushLocation   sm     "%%de<<0  /	 =<   /	 =<<s2   0BA>AA>
BA;;A>>B			B)re   ra   )rI   rJ   rK   rL   r-   rZ   rb   r   r9   rN   rO   r\   r]   r^   r,   r_   r_   k   s-     #,   0 0 0r6   r_   c                   s8   a a ] tR t^t oV 3R ltR tRtVtV ;t# )_TTGlyphSetVARCc                sd   < W0n         \        SV `	  WV4       VR ,          P                  V n        R# )ZVARCN)glyphSetrU   r-   r   	varcTable)r+   r   r   rj   rW   rX   r,   r-   Z_TTGlyphSetVARC.__init__   s(     2f++r6   c                s    V P                   pWP                  P                  9  d   V P                  V,          # \	        W4      # r7   )rk   Coverageglyphsrj   _TTGlyphVARC)r+   r?   varc   && r,   rZ   Z_TTGlyphSetVARC.__getitem__   s5    ~~MM000==++D,,r6   )rj   rk   r[   r]   r^   r,   ri   ri      s     ,
- -r6   ri   c                   sH   a  ] tR t^t o RtRR/R lt]R 4       tR tRt	V t
R# )	_TTGlypha;  Glyph object that supports the Pen protocol, meaning that it has
.draw() and .drawPoints() methods that take a pen object as their only
argument. Additionally there are 'width' and 'lsb' attributes, read from
the 'hmtx' table.

If the font contains a 'vmtx' table, there will also be 'height' and 'tsb'
attributes.
r   Tc               s6   Wn         W n        W0n        VP                  V,          w  V n        V n        VP                  e"   VP                  V,          w  V n        V n        MR R uV n        V n        VP                  '       d   VP                  e   VP                  P                  f   VP                  P                  V4      M&VP                  P                  P                  V,          pV ;P                  VP                  V,          ,          un        R # R # R # r7   )rj   namer   r$   widthlsbr'   heighttsbr   r(   ZAdvWidthMapr   Z
getGlyphIDZmappingr*   )r+   rj   r?   r   Zvaridxs   &&&$ r,   r-   Z_TTGlyph.__init__   s     	('00;
DH($,$5$5i$@!DK$($!DK!3!3!? %%119 ((3''33;;IF 
 JJ(0088J "@r6   c                s    \         h)TDraw the glyph onto ``pen``. See fontTools.pens.basePen for details
how that works.
)ZNotImplementedErrorr+   penr@   r,   drawZ_TTGlyph.draw   s
    
 "!r6   c                s@    ^ RI Hp V P                  V! V4      4       R# )UDraw the glyph onto ``pen``. See fontTools.pens.pointPen for details
how that works.
)SegmentToPointPenN)ZfontTools.pens.pointPenr|   rz   )r+   ry   r|   rp   r,   
drawPointsZ_TTGlyph.drawPoints   s     	>		#C()r6   )rj   ru   rt   rr   r   rv   rs   N)rI   rJ   rK   rL   rM   r-   r   rz   r}   rN   rO   rP   rQ   r,   rq   rq      s4     9D 9$ " "* *r6   rq   c                   s8   a  ] tR t^t o R tR tR tR tRtV t	R# )rY   c                   V P                  4       w  r#V P                  P                  4       ;_uu_ 4       pV'       d   ^ pVP                  WP                  P                  V4       RRR4       R#   + '       g   i     R# ; irw   N)_getGlyphAndOffsetrj   r;   rz   rT   r+   ry   glyphoffsetr    rg   r,   rz   Z_TTGlyphGlyf.draw   sX     //1]]$$&&%JJsMM33V<	 '&&&   1A00B	c                r~   )r{   N)r   rj   r;   r}   rT   r   rg   r,   r}   Z_TTGlyphGlyf.drawPoints   sZ     //1]]$$&&%S--"9"96B	 '&&&r   c                sB   V P                   P                  '       d*   V P                   P                  e   V P                  4       pM'V P                   P                  V P
                  ,          p\        VR4      '       d   V P                  VP                  ,
          M^ pW3# )NxMin)	rj   r   rV   _getGlyphInstancerT   rr   hasattrrt   r   )r+   r   r      &  r,   r   Z_TTGlyphGlyf._getGlyphAndOffset   so    ==!!!dmm&=&=&I**,EMM++DII6E*1%*@*@EJJ&a}r6   c           	     s\   ^ RI Hp ^ RIHp ^ RIHp V P                  pVP                  pVP                  P                  V P                  ,          pVP                  pVP                  pVP                  V P                  Wx4      w  rRRrV F  pV! VP                  VP                  4      pV'       g   K*  VP                   pRV9   dh   Vf[   VP                  V P                  Wx4      w  ppV^ ,          ^8  d
   V^,          M#\#        \%        \'        V^,          4      4      4      pV! WV4      pW! V4      V,          ,          p	K  	  \)        WPP                  ,          4      p\+        VWV P,                  R7      w  ppppVV n        VV n        VP2                  f   VV n        VV n        V# )i    )	iup_delta)GlyphCoordinates)supportScalarNrS   )ZfontTools.varLib.iupr   ZfontTools.ttLib.tables._g_l_y_fr   ZfontTools.varLib.modelsr   rj   rT   rV   
variationsrr   r$   r'   Z_getCoordinatesAndControlsr   r   coordinatesr`   rangerF   r   _setCoordinatesr   rt   rv   r(   rs   ru   )r+   r   r   r   rj   rT   r   r$   r'   r   _Z
origCoordsZendPtsZvarZscalarZdeltaZcontrolr   rs   rt   ru   rv   s   &                     r,   r   Z_TTGlyphGlyf._getGlyphInstance   s   2D9==&&	''22499=
$$$$"==IIx
 "4FC"8#4#4chh?FOOEu}%*3*N*N		8+'J '.ajAo
4c'RS*o@V;W  "%V<+E2V;;K   Yyy)*"1;8I8I#
sFC %DJ DKr6   )ru   rt   rv   rs   N)
rI   rJ   rK   rL   rz   r}   r   r   rN   rO   rP   rQ   r,   rY   rY      s     
=
C( (r6   rY   c                   s&   a  ] tR tRt o R tRtV tR# )rc   i  c                s    V P                   P                  V P                  ,          P                  WP                   P                  4       R# r   )rj   ra   rr   rz   re   rx   r@   r,   rz   Z_TTGlyphCFF.draw  s/     	!!$)),11#}}7L7LMr6    N)rI   rJ   rK   rL   rz   rN   rO   rP   rQ   r,   rc   rc     s     N Nr6   rc   c                 s   V P                   ^8X  d^   V P                  pW,          P                  pVP                  V^ 4      pV P                  pV P
                  pYvu;8*  ;'       d    V8*  # u # V P                   ^8X  d2   V P                  p	WV P                  ,          ^ ,          ,          p	V	^ 8  # V P                   ^8X  d+   V P                   F  p
\        WW#4      '       d   K   R# 	  R# V P                   ^8X  d+   V P                   F  p
\        WW#4      '       g   K   R# 	  R# V P                   ^8X  d   \        V P                  WV4      '       * # R# )r:   FT)ZFormatZ	AxisIndexr   r&   ZFilterRangeMinValueZFilterRangeMaxValueZDefaultValueZVarIdxConditionTable_evaluateConditionZconditionTable)	conditionfvarAxesr   rf   Z	axisIndexr   Z	axisValueZminValueZmaxValuerh   Zsubconditions   &&&&       r,   r   r     s9   1''	%--LL!,	0000000000			Q	&&9++,Q//qy			Q	%44L%lhRR 5 			Q	%44L!,(NN 5 			Q	%$$h)
 
 	
 r6   c                   s2   a  ] tR tRt o R tR tR tRtV tR# )rn   i@  c           
     s   ^ RI HpHp V P                  pVP                  pVP
                  P                  P                  V P                  4      pVP                  P                  V,          p^ RIHp	 ^ RIHp
 VP                  R,          P                   pV	! VP"                  WP                  P$                  4      pVP&                   EF  pVP(                  VP*                  ,          '       dQ   VP,                  P.                  VP0                  ,          p\3        WV P                  P$                  V4      '       g   Kw  / pVP4                  e   VP6                  P8                  VP4                  ,          p\;        VP<                  4      pVP>                  V8w  d$   V\A        WP>                  ,          ^4      ,          p\C        VV4       UUu/ uF  w  ppVV,          PD                  VbK  	  pppVPF                  V8w  d/   WPF                  ,          p\I        V4      pVPK                  V4       VPL                  pVP(                  VPN                  ,          pV P                  P                  PQ                  VV4      ;_uu_ 4        V P                  PQ                  VV4      ;_uu_ 4        V P                  VPR                  8H  pV'       g3    VPU                  VPR                  VV P                  PV                  4       V'       d   VP[                  4       pVPR                  V P                  8w  d   V P                  MVP                  pVVPR                  ,          pV'       d   \]        VV4      pVP_                  V4       M\a        VV4      pVPc                  V4       RRR4       RRR4       EK  	  R# u uppi   \X         d    Rp Li ; i  + '       g   i     L8; i  + '       g   i     EK.  ; i)rw   )VarComponentFlagsNO_VARIATION_INDEX)MultiVarStoreInstancerr   r   NT)2ZfontTools.ttLib.tables.otTablesr   r   rj   rk   rl   rm   Zindexrr   ZVarCompositeGlyphsZVarCompositeGlyphZfontTools.varLib.multiVarStorer   r)   r   r   r   ZMultiVarStorer   
componentsZflagsZHAVE_CONDITIONZConditionListr   ZconditionIndexr   ZaxisIndicesIndexZAxisIndicesListZItemr   
axisValuesZaxisValuesVarIndexfi2flzipr   ZtransformVarIndexr   ZapplyTransformDeltas	transformZRESET_UNSPECIFIED_AXESr9   r?   ZaddVarComponentr   ZAttributeErrorZtoTransformr   r}   r   rz   )r+   ry   Z
isPointPenr   r   rj   ro   Zidxr   r   r   r   rf   compr   r   ZaxisIndicesr   ZiZvZdeltasr   r0   ZshouldDecomposeZtZcompGlyphSetZgZtPens   &&&                         r,   _drawZ_TTGlyphVARC._drawA  s   	

 ==!!mm""((3''99#>I?==(--*--*@*@
	 $$Dzz-<<<< ..==d>Q>QR	))?)?  H$$0"22778M8MN#DOO4
**.@@%	2I2I(JB"OOJ 8;;
7S7Stq!HQK''*7S   %%);;"#9#9:~))&1IJJ!2!I!IIE''44XuEE]]//%@@&*ii4>>&AO*3// $	4==;T;T '%113  $~~: !MM!)!2!2 %
 )8%#4S!#<DLL.#/Q#7DFF4L1 A FE; %$(  . 3.2O3 A@ FEEs[    N9%O%-"O1N?
O	AO';O"O%?OOOOO"O%%O7c                *    V P                  VR 4       R# )FNr   rx   r@   r,   rz   Z_TTGlyphVARC.draw  s    

3r6   c                r   )TNr   rx   r@   r,   r}   Z_TTGlyphVARC.drawPoints  s    

3r6   r   N)	rI   rJ   rK   rL   r   rz   r}   rN   rO   rP   rQ   r,   rn   rn   @  s     L)\ r6   rn   r   Tc                s   VR,          ^ ,          pVR,          ^ ,          pVR,          ^,          pVR,          ^,          p\        ^4       F  pVR K  	  V P                  4       '       dm   V P                   U	u. uF  p	\        V	4      NK  	  up	V n        \	        WP                  4       F(  w  r\        V	R4      '       g   K  V
w  V	n        V	n        K*  	  MV P                  ^ 8X  d   MWn	        V'       d   V P                  V4       \        WT,
          4      p\        Wg,
          4      p\        V P                  V,
          4      p\        W`P                  ,
          4      pVVVV3# u up	i )i   xiiii)r   ZisCompositer   r   r   r   r   ZyZnumberOfContoursr   r   r   r   ZyMax)r   ZcoordrT   r   Z	leftSideXZ
rightSideXZtopSideYZbottomSideYr   r   ZpZhorizontalAdvanceWidthZverticalAdvanceWidthZleftSideBearingZtopSideBearings   &&&$           r,   r   r     s7    b	!Ir1JRy|H)A,K1X"I  383C3CD3C4DJ3CD5"2"23GAtS!!!" 4 
		1	$ "9%$Z%;<"8#9:ejj945OX

23N	 # Es   :E(c                   sF   a  ] tR tRt o RtR
R ltR tR tR tR t	Rt
V tR	# )LerpGlyphSeti  a  A glyphset that interpolates between two other glyphsets.

Factor is typically between 0 and 1. 0 means the first glyphset,
1 means the second glyphset, and 0.5 means the average of the
two glyphsets. Other values are possible, and can be useful to
extrapolate. Defaults to 0.5.
c                s*    Wn         W n        W0n        R # r7   )	glyphset1	glyphset2factor)r+   r   r   r   s   &&&&r,   r-   ZLerpGlyphSet.__init__  s    ""r6   c                sn    WP                   9   d   WP                  9   d   \        W4      # \        V4      hr7   )r   r   	LerpGlyphZKeyErrorr+   	glyphnamer@   r,   rZ   ZLerpGlyphSet.__getitem__  s+    &9+FY--y!!r6   c                sJ    WP                   9   ;'       d    WP                  9   # r7   )r   r   r   r@   r,   rA   ZLerpGlyphSet.__contains__  s    NN*JJyNN/JJr6   c                    \        V P                  4      p\        V P                  4      p\        VP	                  V4      4      # r7   )setr   r   rB   intersectionr+   Zset1Zset2r   r,   rE   ZLerpGlyphSet.__iter__  s4    4>>"4>>"D%%d+,,r6   c                r   r7   )r   r   r   rF   r   r   r   r,   rG   ZLerpGlyphSet.__len__  s4    4>>"4>>"4$$T*++r6   )r   r   r   N)g      ?)rI   rJ   rK   rL   rM   r-   rZ   rA   rE   rG   rN   rO   rP   rQ   r,   r   r     s)     
"
K-
, ,r6   r   c                   s,   a  ] tR tRt o R tR tRtV tR# )r   i  c                s    W n         Wn        R # r7   )glyphsetr   )r+   r   r   r8   r,   r-   ZLerpGlyph.__init__  s     "r6   c                s   \        V P                  P                  4      pV P                  P                  V P                  ,          P	                  V4       \        V P                  P
                  4      pV P                  P
                  V P                  ,          P	                  V4       V P                  P                  p\        \        VP                  VP                  V4      V4       R # r7   )
r   r   r   r   rz   r   r   r   r   rh   )r+   ry   Z
recording1Z
recording2r   rg   r,   rz   ZLerpGlyph.draw  s    ,T]]-D-DE
/44Z@,T]]-D-DE
/44Z@%%z'7'79I9I6RTWXr6   )r   r   N)rI   rJ   rK   rL   r-   rz   rN   rO   rP   rQ   r,   r   r     s     #Y Yr6   r   N)*rM   Zabcr    r   Zcollections.abcr   Z
contextlibr   r   r   Ztypesr   ZfontTools.misc.vectorr   ZfontTools.misc.fixedToolsr   r	   r   ZfontTools.misc.loggingToolsr
   ZfontTools.misc.transformr   r   ZfontTools.pens.transformPenr   r   ZfontTools.pens.recordingPenr   r   r   r   rR   r_   ri   rq   rY   rc   r   rn   r   r   r   r   r6   r,   <module>r      s    % # # %  ! ( D 9 C G J/' J/ZMk M!0[ !0H
-k 
-)*s )*XJ8 JZN( N FS8 Sl#T #L,7 ,BY Yr6   