+
    i̩                     .   R t ^ RIHtHtHtHt ^ RIHtHtH	t	H
t
 ^ RIHt ^ RIt^ RIt]P                  ! ]4      tR tR tR tR tR	 tR
 tR tR tR tR.R,          t^ ].,          ]R&   ^].,          ]R&   ^].,          ]R&   ^].,          ]R&   ]]^&   ]! ]4      R8X  g   Q h]R,          t]]^&   ]]^&   ]R,          t]]^&   ]]^&   ]]^&   . R.Ot] ! ]4       U Uu/ uF  w  rWbK	  	  upp t!^t"R t#. R/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNt$R t%]%! R4      t&]%! R4      t']%! R4      t(]PR                  3R lt*]! ^4      ]! ^4      ,           t+R t, ! R R]-4      t. ! R R]/4      t0. RcOt1 ! R R ]04      t2 ! R! R"]04      t3 ! R# R$]34      t4 ! R% R&]44      t5 ! R' R(]/4      t6 ! R) R*]64      t7 ! R+ R,]/4      t8R- t9R# u upp i )dzwpsCharStrings.py -- module implementing various kinds of CharStrings:
CFF dictionary data and Type1/Type2 CharStrings.
)fixedToFloatfloatToFixedfloatToFixedToStrstrToFixedToFloat)bytechrbyteord	bytesjoinstrjoin)	BoundsPenNc                     V^8X  d   V\        W#,          4      3pV^,           pMTp V P                  V,          pT P                  T4      pYc3#   \         d    RT3u # i ; i)   N)r   	operatorsKeyErrorhandle_operator)selfb0dataindexopoperatorvalues   &&&&   |/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/fontTools/misc/psCharStrings.pyread_operatorr      sp    	Rx'$+&'	>>"%   *E<  U{s   A A! A!c                     V^,
          V3# )    r   r   r   r   s   &&&&r   	read_byter   "   s    8U?    c                 r    \        W#,          4      pV^,
          R,          V,           ^l,           V^,           3# )      r   r   r   r   r   b1s   &&&& r   read_smallInt1r%   &   s0    		BHb 3&	11r   c                 t    \        W#,          4      pV^,
          ) R,          V,
          ^l,
          V^,           3# )   r!   r"   r#   s   &&&& r   read_smallInt2r(   +   s2    		B#X;r!C'22r   c                 Z    \         P                  ! R W#V^,            4      w  pWC^,           3# )>hstructunpackr   r   r   r   r   s   &&&& r   read_shortIntr/   0   *    }}T4	#:;HU!)r   c                 Z    \         P                  ! R W#V^,            4      w  pWC^,           3# )>lr+   r.   s   &&&& r   read_longIntr3   5   r0   r   c                 r    \         P                  ! R W#V^,            4      w  p\        V^R7      V^,           3# )r2   precisionBits)r,   r-   r   r.   s   &&&& r   read_fixed1616r7   :   s3    }}T4	#:;HUR0%!);;r   c                 .    \         '       g   Q h\        V3# N)NotImplementedErrorNotImplementedr   s   &&&&r   read_reservedr<   ?   s    5  r   c                     R p \        W#,          4      pV^,           pV^,          ^,	          pV^,          pV^8X  d   M2V\        V,          ,           pV^8X  d   MV\        V,          ,           pKn  \        V4      V3# ) )r   realNibblesfloat)r   r   r   r   numberbnibble0nibble1s   &&&&    r   read_realNumberrE   D   sv    F
DK 	t8/d(c>+g..c>+g..=%r   r!   :        N:rG   r    N:r    r'   N:r'      NNNNc                    / p/ pV  F|  p\        V4      ^8X  d   V^,          W^ ,          &   MVR,          W^ ,          &   \        V^ ,          \        4      '       d   V^ ,          W#^,          &   Ki  V^ ,          3W#^,          &   K~  	  W3# )      NN)len
isinstancetuple)operatorListoperopcitems   &   r   buildOperatorDictrU   |   sz    D
Ct9> GDaM HDaMd1gu%%7CQL G:CQL  9r   c                     V R 8X  d   \        ^4      p\        ^4      pM+V R8X  d   Rp\        ^4      pMV R8X  g   Q h\        ^4      pRpV\         \        P                  \        P                  V3R lpV# )cfft1Nt2c                 8   RT u;8:  d   ^k8:  d   M MV! V ^,           4      pV# ^lT u;8:  d   R8:  d9   M M5V ^l,
          p V! V ^,	          ^,           4      V! V ^,          4      ,           pV# RT u;8:  d   R8:  d:   M M6V ) ^l,
          p V! V ^,	          ^,           4      V! V ^,          4      ,           pV# Ve$   R	T u;8:  d   R8:  d   M MWS! RV 4      ,           pV# Vf.   \         P                  R4       V! ^4      V! RV 4      ,           pV# W! RV 4      ,           pV# )
k   k  i  r*   zk4-byte T2 number got passed to the IntType handler. This should happen only when reading in old XML files.
r2   iiii )logwarning)r   
fourByteOpr   packr-   	twoByteOpcodes   &&&&&& r   	encodeInt getIntEncoder.<locals>.encodeInt   s%    5C53;'D4 3 E!T!CKEEQJ#-.1FFD. - e#t#FSLEEQJ#-.1FFD( ' "v'?%'?tD%00D$ #  KK#
 3<$tU"33D  T5 11Dr   )r   r,   r`   r-   )formatra   r_   rc   s   &   r   getIntEncoderrf      sq    BK	R[
	4	S\
~~BK	
 [[}}#J r   rW   rX   rY   c                |    \        V ^R7      pVR,          ^ 8X  d   \        V^,	          4      # RV! RV4      ,           # )zFor T2 onlyr5   i     r2   )r   encodeIntT2)fr`   r   s   && r   encodeFixedrk      s;    "-Ev~5B;''dE***r   c                    V R 8X  d   \         # RV ,          pVR,          R8X  d   VR,          pMVR,          R8X  d   RVR,          ,           pMVP                  R	4      '       d7   VP                  R
4      pRV\        V4      \        V4      ,
          3,          pMVP	                  R4      pVP	                  R4      pVR8w  dZ   VR8w  dS   VRV pW^,           V p\        W^,           R 4      pV\        V4      ,
          pV^8X  d   V: V: R
2pMRWVV3,          pVP                  R4      '       d8   VP                  R^4      w  rRWP                  R
4      \        V4      3,          p. p
V'       d   V^ ,          pVR,          pVR8X  dM   VR,          pVR8X  d   VR,          pRpMVR8X  d
   VR,          pVP                  R
4      '       d
   VR,          pV
P                  \        V,          4       K  V
P                  ^4       \        V
4      ^,          '       d   V
P                  ^4       \        ^4      p\        ^ \        V
4      ^4       F6  pV\        W,          ^,          W^,           ,          ,          4      ,           pK8  	  V# )g        z%.8G:NrK   Nz0.rL   :N   Nz-0.-:rK   NN0000z%sE%d.ENz%s%sE%dz%s%sE-%d:NrM   NE-+)z.0z-.0)realZeroBytesendswithrstriprN   findint
startswithsplitlstripappendrealNibblesDictr   range)rj   ssignificantDigitsdotIndexeIndexintegerPartfractionalPartexponentnewExponentsignnibblescc2dis   &              r   encodeFloatr     s#   Cx 	
Au}bE	
2%!B%K	
E		HHSM(#a&37H3I*IJJ66#;r>flIX,K!|f5N1aZ\?+H"S%88Ka*N;k JJ||M""''#q/$s1v66G
aDbE82BSybEsbE||C  bEq)*NN3
7|asA1c'lA&
a'a%.899 'Hr   c                       ] tR tRtRtR# )CharStringCompileErrori?  r   N)__name__
__module____qualname____firstlineno____static_attributes__r   r   r   r   r   ?  s    r   r   c                   &  a  ] tR tRt o R.R ltR tRR/R ltR tR tR	 t	R
 t
R tR tR tR tR tR tR tR tR t]tR tR tR tR tR tR tR tR tR tR tR tR t R  t!R! t"R" t#R# t$R$ t%R% t&R& t'R' t(R( t)R) t*R* t+R+ t,R, t-R-t.V t/R# )/SimpleT2DecompileriC  Nc                    Wn         \        V4      V n        W n        \        V4      V n        W0n        W@n        V P                  4        R # r9   )
localSubrscalcSubrBias	localBiasglobalSubrs
globalBiasprivateblenderreset)r   r   r   r   r   s   &&&&&r   __init__SimpleT2Decompiler.__init__D  s8    $%j1&&{3

r   c                Z    . V n         . V n        ^ V n        ^ V n        ^ V n        ^ V n        R# rF   N)callingStackoperandStack	hintCounthintMaskBytes
numRegionsvsIndexr   s   &r   r   SimpleT2Decompiler.resetM  s/    r   pushToStackc                  V P                   P                  V4       VP                  4       pV'       d   . pVP                  pMR  pVf   V P                  P                  p^ p VP	                  V4      w  rxpVf   MeV! V4       V'       dL   RV,           p	\        W	R4      p
V
e!   V
! V4      pV'       d   Vw  rV! V4       Ka  Kc  V P                  4        Ku  V! V4       K  V'       d   VP                  X4       V P                   R R# )c                     R # r9   r   )xs   &r   <lambda>,SimpleT2Decompiler.execute.<locals>.<lambda>\  s    dr   Nop_ru   )r   r~   needsDecompilationr   getTokengetattrpopall
setProgram)r   
charStringr   r   programpushToProgramr   token
isOperatorhandlerNamehandlerrvr   s   &&$          r   executeSimpleT2Decompiler.executeU  s      ,'::<G#NNM*M++22K'1':':5'A$Eu}% #em!$T:& B/1,%m4  KKME"!!'*b!r   c                F    V P                   R,          pV P                   R V# rM   ru   r   r   r   s   & r   popSimpleT2Decompiler.popu  s%    !!"%b!r   c                J    V P                   R ,          p. V P                   R &   V# rI   r   r   stacks   & r   r   SimpleT2Decompiler.popallz  s'    !!!$!!r   c                <    V P                   P                  V4       R # r9   )r   r~   r   s   &&r   pushSimpleT2Decompiler.push  s      'r   c                .    V P                   '       d   R # R # r9   r   r   r   s   &&r   	op_returnSimpleT2Decompiler.op_return  s     r   c                    R # r9   r   r   s   &&r   
op_endcharSimpleT2Decompiler.op_endchar      r   c                    R # r9   r   r   s   &&r   	op_ignoreSimpleT2Decompiler.op_ignore  r   r   c                    V P                  4       pV P                  W P                  ,           ,          pV P                  V4       R # r9   )r   r   r   r   r   r   	subrIndexsubrs   &&  r   op_callsubrSimpleT2Decompiler.op_callsubr  s.    HHJ	y>>9:Tr   c                    V P                  4       pV P                  W P                  ,           ,          pV P                  V4       R # r9   )r   r   r   r   r   s   &&  r   op_callgsubrSimpleT2Decompiler.op_callgsubr  s0    HHJ		OO ;<Tr   c                &    V P                  4        R # r9   
countHintsr   s   &&r   op_hstemSimpleT2Decompiler.op_hstem      r   c                &    V P                  4        R # r9   r   r   s   &&r   op_vstemSimpleT2Decompiler.op_vstem  r   r   c                &    V P                  4        R # r9   r   r   s   &&r   
op_hstemhmSimpleT2Decompiler.op_hstemhm  r   r   c                &    V P                  4        R # r9   r   r   s   &&r   
op_vstemhmSimpleT2Decompiler.op_vstemhm  r   r   c                    V P                   '       g0   V P                  4        V P                  ^,           ^,          V n         V P                  R,          P	                  WP                   4      w  r!W!3# )   ru   )r   r   r   r   getBytes)r   r   r   s   && r   op_hintmaskSimpleT2Decompiler.op_hintmask  s[    !!!OO"&..1"4!:D#004==eEWEWX##r   c                v    V P                  4       pV P                  \        V4      ^,          ,           V n        R# rK   N)r   r   rN   r   argss   & r   r   SimpleT2Decompiler.countHints  s%    {{}#d)q.8r   c                    \         hr9   r:   r   s   &&r   op_andSimpleT2Decompiler.op_and      !!r   c                    \         hr9   r   r   s   &&r   op_orSimpleT2Decompiler.op_or  r  r   c                    \         hr9   r   r   s   &&r   op_notSimpleT2Decompiler.op_not  r  r   c                    \         hr9   r   r   s   &&r   op_storeSimpleT2Decompiler.op_store  r  r   c                    \         hr9   r   r   s   &&r   op_absSimpleT2Decompiler.op_abs  r  r   c                    \         hr9   r   r   s   &&r   op_addSimpleT2Decompiler.op_add  r  r   c                    \         hr9   r   r   s   &&r   op_subSimpleT2Decompiler.op_sub  r  r   c                    \         hr9   r   r   s   &&r   op_divSimpleT2Decompiler.op_div  r  r   c                    \         hr9   r   r   s   &&r   op_loadSimpleT2Decompiler.op_load  r  r   c                    \         hr9   r   r   s   &&r   op_negSimpleT2Decompiler.op_neg  r  r   c                    \         hr9   r   r   s   &&r   op_eqSimpleT2Decompiler.op_eq  r  r   c                    \         hr9   r   r   s   &&r   op_dropSimpleT2Decompiler.op_drop  r  r   c                    \         hr9   r   r   s   &&r   op_putSimpleT2Decompiler.op_put  r  r   c                    \         hr9   r   r   s   &&r   op_getSimpleT2Decompiler.op_get  r  r   c                    \         hr9   r   r   s   &&r   	op_ifelseSimpleT2Decompiler.op_ifelse  r  r   c                    \         hr9   r   r   s   &&r   	op_randomSimpleT2Decompiler.op_random  r  r   c                    \         hr9   r   r   s   &&r   op_mulSimpleT2Decompiler.op_mul  r  r   c                    \         hr9   r   r   s   &&r   op_sqrtSimpleT2Decompiler.op_sqrt  r  r   c                    \         hr9   r   r   s   &&r   op_dupSimpleT2Decompiler.op_dup  r  r   c                    \         hr9   r   r   s   &&r   op_exchSimpleT2Decompiler.op_exch  r  r   c                    \         hr9   r   r   s   &&r   op_indexSimpleT2Decompiler.op_index  r  r   c                    \         hr9   r   r   s   &&r   op_rollSimpleT2Decompiler.op_roll  r  r   c                H   V P                   ^ 8X  d    V P                  P                  4       V n         V P                  4       pW P                   ^,           ,          pV P                  f   V P
                  W2,
          ) R1 R# \        V P
                  4      V,
          pWB,           ;rVWE8  di   W`P                   ,           pV P
                  Wg pV P	                  V P                  V4      p	V P
                  V;;,          V	,          uu&   TpV^,          pKn  . V P
                  VR% R# r   )r   r   getNumRegionsr   r   r   rN   r   )
r   r   	numBlendsnumOpsargiend_argstupleinext_tideltasdeltas
   &&        r   op_blendSimpleT2Decompiler.op_blend  s    ??a"ll88:DOHHJ	oo12<<!!$%' t(()F2D $ 00H/ ??2**6:T\\6:!!$'50' 	+-Dhi(r   c                r    V P                  4       pW n        V P                  P                  V4      V n        R # r9   )r   r   r   rD  r   )r   r   vis   && r   
op_vsindexSimpleT2Decompiler.op_vsindex  s(    XXZ,,44R8r   )r   r   r   r   r   r   r   r   r   r   r   r   NN)0r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   op_cntrmaskr   r  r  r  r  r  r  r  r  r  r  r   r#  r&  r)  r,  r/  r2  r5  r8  r;  r>  rA  rM  rQ  r   __classdictcell____classdict__s   @r   r   r   C  s     " "@

(

$ K9
"""""""""""""""""""""".*9 9r   r   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )T2StackUseExtractori+  c                >   <a a ^ oVV 3R lp\         SS `  WR7       S# )rF   c                 |   < SP                   P                  V 4       \        S\        SP                   4      4      oR # r9   )r   r~   maxrN   )r   maxStackUser   s   &r   r   0T2StackUseExtractor.execute.<locals>.pushToStack0  s.    $$U+k3t/@/@+ABKr   )r   )superr   )r   r   r   r]  	__class__s   f& @r   r   T2StackUseExtractor.execute-  s$    	C
 	
<r   r   )r   r   r   r   r   r   rU  __classcell__r`  rW  s   @@r   rY  rY  +  s     	 	r   rY  c                   X   a  ] tR tRt o RR ltR tRR ltR tR tR t	R	 t
R
 tRtV tR# )T2WidthExtractori9  Nc                L    \         P                  WW%V4       W0n        W@n        R # r9   )r   r   nominalWidthXdefaultWidthX)r   r   r   rg  rh  r   r   s   &&&&&&&r   r   T2WidthExtractor.__init__:  s"     	##DkGT**r   c                L    \         P                  V 4       ^ V n        ^ V n        R# r   )r   r   gotWidthwidthr   s   &r   r   T2WidthExtractor.resetG  s      &
r   c                4   V P                  4       pV P                  '       gv   V\        V4      ^,          ,          '       d?   V P                  f   Q R4       hV P                  V^ ,          ,           V n        VR,          pMV P                  V n        ^V n        V# )rK   z5CFF2 CharStrings must not have an initial width valuerL   )r   rk  rN   rh  rg  rl  )r   evenOddr   s   && r   popallWidthT2WidthExtractor.popallWidthL  s    {{}}}}#d)a-(( &&2KJK2!//$q'9
Bx!//
DMr   c                v    V P                  4       pV P                  \        V4      ^,          ,           V n        R# r   )rp  r   rN   r   s   & r   r   T2WidthExtractor.countHints[  s(    !#d)q.8r   c                &    V P                  4        R # r9   rp  r   s   &&r   
op_rmovetoT2WidthExtractor.op_rmoveto_      r   c                (    V P                  ^4       R# rM   Nru  r   s   &&r   
op_hmovetoT2WidthExtractor.op_hmovetob      r   c                (    V P                  ^4       R# rz  ru  r   s   &&r   
op_vmovetoT2WidthExtractor.op_vmovetoe  r}  r   c                &    V P                  4        R # r9   ru  r   s   &&r   r   T2WidthExtractor.op_endcharh  rx  r   )rh  rk  r   rg  rl  rS  rF   )r   r   r   r   r   r   rp  r   rv  r{  r  r   r   rU  rV  s   @r   re  re  9  s2     +
9 r   re  c                   h  a a ] tR tRt oR7R ltR tV 3R ltR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R  t"R! t#R" t$R# t%R$ t&R% t'R& t(R' t)R( t*R) t+R* t,R+ t-R, t.R- t/R. t0R/ t1R0 t2R1 t3R2 t4R3 t5R4 t6R5 t7R6t8Vt9V ;t:# )8T2OutlineExtractoril  c           	     V    \         P                  V VVVVVV4       Wn        ^ V n        R# r   )re  r   pen	subrLevel)r   r  r   r   rg  rh  r   r   s   &&&&&&&&r   r   T2OutlineExtractor.__init__m  s5     	!!	
 r   c                Z    \         P                  V 4       RV n        ^ V n        ^ V n        R# rF   N)rF   rF   )re  r   currentPoint	sawMoveTor  r   s   &r   r   T2OutlineExtractor.reset  s&    t$"r   c                   < V ;P                   ^,          un         \        SV `	  V4       V ;P                   ^,          un         V P                   ^ 8X  d   V P                  4        R# R# rz  )r  r_  r   endPath)r   r   r`  s   &&r   r   T2OutlineExtractor.execute  sE    !
#!>>QLLN r   c                j    V P                   w  r#W!^ ,          ,           W1^,          ,           3pWn         V# r  )r  )r   pointr   ys   &&  r   
_nextPointT2OutlineExtractor._nextPoint  s0      !Ha(l*!r   c                h    V P                   P                  V P                  V4      4       ^V n        R# rz  )r  moveTor  r  r   r  s   &&r   rMoveToT2OutlineExtractor.rMoveTo  s"    ./r   c                    V P                   '       g   V P                  R4       V P                  P                  V P	                  V4      4       R# r  )r  r  r  lineTor  r  s   &&r   rLineToT2OutlineExtractor.rLineTo  s0    ~~~LL ./r   c                    V P                   '       g   V P                  R4       V P                  pV P                  P	                  V! V4      V! V4      V! V4      4       R# r  )r  r  r  r  curveTo)r   pt1pt2pt3	nextPoints   &&&& r   rCurveToT2OutlineExtractor.rCurveTo  sB    ~~~LL OO	333Hr   c                l    V P                   '       d   V P                  P                  4        ^ V n         R# r   )r  r  	closePathr   s   &r   r  T2OutlineExtractor.closePath  s"    >>>HH r   c                N    V P                   '       d   V P                  4        R # R # r9   )r  r  r   s   &r   r  T2OutlineExtractor.endPath  s    
 >>>NN r   c                d    V P                  4        V P                  V P                  4       4       R # r9   r  r  rp  r   s   &&r   rv  T2OutlineExtractor.op_rmoveto  s     T%%'(r   c                x    V P                  4        V P                  V P                  ^4      ^ ,          ^ 34       R# rz  r  r   s   &&r   r{  T2OutlineExtractor.op_hmoveto  s,    d&&q)!,a01r   c                x    V P                  4        V P                  ^ V P                  ^4      ^ ,          34       R# r   r  r   s   &&r   r  T2OutlineExtractor.op_vmoveto  s,    a))!,Q/01r   c           	     
   V P                  4        V P                  4       pV'       d[   ^ RIHp Vw  rErgW6,          pV P                  P                  VR4       W7,          p	V P                  P                  V	^^ ^ ^WE34       R# R# )rF   StandardEncodingNrM   rF   rF   rM   rF   rF   )r  rp  $fontTools.encodings.StandardEncodingr  r  addComponent)
r   r   r   r  adxadybcharachar	baseGlyphaccentGlyphs
   &&        r   r   T2OutlineExtractor.op_endchar  st    !M &*"Ce(/IHH!!)-?@*1KHH!!+1aC/EF r   c                    V P                  4       p\        ^ \        V4      ^4       F  pW#V^,            pV P                  V4       K!  	  R# r   )r   r   rN   r  )r   r   r   r   r  s   &&   r   
op_rlinetoT2OutlineExtractor.op_rlineto  s=    {{}q#d)Q'AQUOELL (r   c                (    V P                  ^4       R# rz  alternatingLinetor   s   &&r   
op_hlinetoT2OutlineExtractor.op_hlineto      q!r   c                (    V P                  ^ 4       R# r   r  r   s   &&r   
op_vlinetoT2OutlineExtractor.op_vlineto  r  r   c                    V P                  4       p\        ^ \        V4      ^4       F+  pW#V^,            w  pppppp	V P                  WE3Wg3W34       K-  	  R# )z${dxa dya dxb dyb dxc dyc}+ rrcurvetoN)r   r   rN   r  )
r   r   r   r   dxadyadxbdybdxcdycs
   &&        r   op_rrcurvetoT2OutlineExtractor.op_rrcurveto  s^    {{}q#d)Q'A QMM3*sj3*= (r   c                    V P                  4       p\        ^ \        V4      ^,
          ^4       F(  pW#V^,            w  rErgrV P                  WE3Wg3W34       K*  	  V P	                  VRR 4       R# )z-{dxa dya dxb dyb dxc dyc}+ dxd dyd rcurvelineN)r   r   rN   r  r  )
r   r   r   r   r  r  r  r  dxddyds
   &&        r   op_rcurveline T2OutlineExtractor.op_rcurveline  sf    {{}q#d)a-+A+/AE?(CcMM3*sj3*= , 	T"#Yr   c                    V P                  4       pVRR p\        ^ \        V4      ^4       F  pV P                  W4V^,            4       K  	  VRR w  rVrxrV P	                  WV3Wx3W34       R# )z-{dxa dya}+ dxb dyb dxc dyc dxd dyd rlinecurveNi)r   r   rN   r  r  )r   r   r   lineArgsr   r  r  r  r  r  r  s   &&         r   op_rlinecurve T2OutlineExtractor.op_rlinecurve  sl    {{}9q#h-+ALLa!e,- ,'+BCy$#Csj3*sj9r   c                   V P                  4       p\        V4      ^,          '       d   V^ ,          pVR,          pM^ p\        ^ \        V4      ^4       F*  pW$V^,            w  rVrxV P                  W53Wg3^ V34       ^ pK,  	  R# )z!dx1? {dya dxb dyb dyc}+ vvcurvetorL   Nr   rN   r   r  )	r   r   r   dx1r   r  r  r  r  s	   &&       r   op_vvcurvetoT2OutlineExtractor.op_vvcurveto  sw    {{}t9q==q'C8DCq#d)Q'A!%!a%CcMM3*sj1c(;C (r   c                   V P                  4       p\        V4      ^,          '       d   V^ ,          pVR,          pM^ p\        ^ \        V4      ^4       F*  pW$V^,            w  rVrxV P                  WS3Wg3V^ 34       ^ pK,  	  R# )z!dy1? {dxa dxb dyb dxc}+ hhcurvetorL   Nr  )	r   r   r   dy1r   r  r  r  r  s	   &&       r   op_hhcurvetoT2OutlineExtractor.op_hhcurveto  sw    {{}t9q==q'C8DCq#d)Q'A!%!a%CcMM3*sj3(;C (r   c                    V P                  4       pV'       d/   V P                  V4      pV'       g   K#  V P                  V4      pK6  R# )zydy1 dx2 dy2 dx3 {dxa dxb dyb dyc dyd dxe dye dxf}* dyf? vhcurveto (30)
{dya dxb dyb dxc dxd dxe dye dyf}+ dxf? vhcurveto
N)r   vcurvetohcurvetor   r   r   s   && r   op_vhcurvetoT2OutlineExtractor.op_vhcurveto*  8     {{}==&Dt}}T* r   c                    V P                  4       pV'       d/   V P                  V4      pV'       g   K#  V P                  V4      pK6  R# )z`dx1 dx2 dy2 dy3 {dya dxb dyb dxc dxd dxe dye dyf}* dxf?
{dxa dxb dyb dyc dyd dxe dye dxf}+ dyf?
N)r   r  r  r  s   && r   op_hvcurvetoT2OutlineExtractor.op_hvcurveto4  r  r   c                    V P                  4       w  r#rErgp^ ;p	;p
;rV) pV P                  W)3W43WZ34       V P                  Wk3W}3W34       R# r   r   r  )r   r   r  dx2dy2dx3dx4dx5dx6r  dy3dy4dy6dy5s   &&            r   op_hflexT2OutlineExtractor.op_hflexA  s[    ,0KKM)#Cc !!!c!Cdsj3*sj9sj3*sj9r   c                    V P                  4       w  r#rErgrrrpV P                  W#3WE3Wg34       V P                  W3W3W34       R # r9   r  )r   r   r  r  r  r  r  r  r  r  r  r  r  r  fds   &&             r   op_flexT2OutlineExtractor.op_flexH  sH    IMF#Cc#Bsj3*sj9sj3*sj9r   c           	         V P                  4       w	  r#rErgrp
^ ;rW5,           V,           V,           V	,           ) pV P                  W#3WE3Wk34       V P                  W|3W3W34       R# r   r  )r   r   r  r  r  r  r  r  r  r  r  r  r  r  s   &&            r   	op_hflex1T2OutlineExtractor.op_hflex1M  sc    6:kkm3#Cc	C#%+,sj3*sj9sj3*sj9r   c                J   V P                  4       w  r#rErgrrpW$,           V,           V,           V
,           pW5,           V,           V	,           V,           p\        V4      \        V4      8  d   TpV) pMV) pTpV P                  W#3WE3Wg34       V P                  W3W3VV34       R # r9   )r   absr  )r   r   r  r  r  r  r  r  r  r  r  r  d6dxdyr  r  s   &&               r   op_flex1T2OutlineExtractor.op_flex1U  s    ?C{{}<#Cc"Y_s"S(Y_s"S(r7SWC#C#CCsj3*sj9sj3*sCj9r   c                    \         hr9   r   r   s   &&r   r  T2OutlineExtractor.op_andc  r  r   c                    \         hr9   r   r   s   &&r   r  T2OutlineExtractor.op_orf  r  r   c                    \         hr9   r   r   s   &&r   r  T2OutlineExtractor.op_noti  r  r   c                    \         hr9   r   r   s   &&r   r  T2OutlineExtractor.op_storel  r  r   c                    \         hr9   r   r   s   &&r   r  T2OutlineExtractor.op_abso  r  r   c                    \         hr9   r   r   s   &&r   r  T2OutlineExtractor.op_addr  r  r   c                    \         hr9   r   r   s   &&r   r  T2OutlineExtractor.op_subu  r  r   c                    V P                  4       pV P                  4       pW2,          pW2,          pWE8X  d   V P                  V4       R # V P                  V4       R # r9   )r   r   )r   r   num2num1d1d2s   &&    r   r  T2OutlineExtractor.op_divx  sA    xxzxxz\[8IIbMIIbMr   c                    \         hr9   r   r   s   &&r   r  T2OutlineExtractor.op_load  r  r   c                    \         hr9   r   r   s   &&r   r  T2OutlineExtractor.op_neg  r  r   c                    \         hr9   r   r   s   &&r   r   T2OutlineExtractor.op_eq  r  r   c                    \         hr9   r   r   s   &&r   r#  T2OutlineExtractor.op_drop  r  r   c                    \         hr9   r   r   s   &&r   r&  T2OutlineExtractor.op_put  r  r   c                    \         hr9   r   r   s   &&r   r)  T2OutlineExtractor.op_get  r  r   c                    \         hr9   r   r   s   &&r   r,  T2OutlineExtractor.op_ifelse  r  r   c                    \         hr9   r   r   s   &&r   r/  T2OutlineExtractor.op_random  r  r   c                    \         hr9   r   r   s   &&r   r2  T2OutlineExtractor.op_mul  r  r   c                    \         hr9   r   r   s   &&r   r5  T2OutlineExtractor.op_sqrt  r  r   c                    \         hr9   r   r   s   &&r   r8  T2OutlineExtractor.op_dup  r  r   c                    \         hr9   r   r   s   &&r   r;  T2OutlineExtractor.op_exch  r  r   c                    \         hr9   r   r   s   &&r   r>  T2OutlineExtractor.op_index  r  r   c                    \         hr9   r   r   s   &&r   rA  T2OutlineExtractor.op_roll  r  r   c                    V P                  4       pV F,  pV'       d   V^ 3pM^ V3pV P                  V4       V'       * pK.  	  R# r   )r   r  )r   isHorizontalr   argr  s   &&   r   r  $T2OutlineExtractor.alternatingLineto  s@    {{}CaCLL++L r   c                    VR ,          w  r#rEVR,          p\        V4      ^8X  d   V^ ,          p. pM^ pV P                  ^ V3W43WV34       V# :N   N:rE  NNrN   r  )r   r   r  r  r  r  r  s   &&     r   r  T2OutlineExtractor.vcurveto  sT    !"X#Bxt9>q'CDCq#h
SJ7r   c                    VR ,          w  r#rEVR,          p\        V4      ^8X  d   V^ ,          p. pM^ pV P                  V^ 3W43We34       V# rD  rF  )r   r   r  r  r  r  r  s   &&     r   r  T2OutlineExtractor.hcurveto  sT    !"X#Bxt9>q'CDCsAh
SJ7r   )r  r  r  r  rS  );r   r   r   r   r   r   r   r  r  r  r  r  r  rv  r{  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r#  r&  r)  r,  r/  r2  r5  r8  r;  r>  rA  r  r  r  r   rU  rb  rc  s   @@r   r  r  l  s    ,0
I
6)22G" ""> :++::
::""""""""""""""""""""",		 	r   r  c                      a  ] tR tRt o R tR tR tRR ltR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )T1OutlineExtractori  c                >    Wn         W n        V P                  4        R # r9   )r  subrsr   )r   r  rM  s   &&&r   r   T1OutlineExtractor.__init__  s    


r   c                Z    ^ V n         ^ V n        ^ V n        \        P	                  V 4       R# r   )flexingrl  sbxr  r   r   s   &r   r   T1OutlineExtractor.reset  s%    
  &r   c                l    V P                   '       d   V P                  P                  4        ^ V n         R# r   )r  r  r  r   s   &r   r  T1OutlineExtractor.endPath  s"    >>>HHr   c                "    V P                  4       # r9   r   )r   ro  s   &&r   rp  T1OutlineExtractor.popallWidth      {{}r   c                P    V P                   pVR,          VR,          uVR&   VR&   R# )rK   Nr  ru   r   r   s   & r   exchT1OutlineExtractor.exch  s)    !!$Ry%)b	59r   c                    V P                   '       d   R # V P                  4        V P                  V P                  4       4       R # r9   )rP  r  r  r   r   s   &&r   rv  T1OutlineExtractor.op_rmoveto  s)    <<<T[[]#r   c                    V P                   '       d   V P                  ^ 4       R# V P                  4        V P                  V P	                  4       ^ ,          ^ 34       R# r   )rP  r   r  r  r   r   s   &&r   r{  T1OutlineExtractor.op_hmoveto  s>    <<<IIaLdkkmA&*+r   c                    V P                   '       d$   V P                  ^ 4       V P                  4        R# V P                  4        V P	                  ^ V P                  4       ^ ,          34       R# r   )rP  r   rZ  r  r  r   r   s   &&r   r  T1OutlineExtractor.op_vmoveto  sG    <<<IIaLIIKaq)*+r   c                &    V P                  4        R # r9   )r  r   s   &&r   op_closepathT1OutlineExtractor.op_closepath  s    r   c                >    V P                  4       pVw  r4W43V n        R # r9   )r   r  )r   r   r   r   r  s   &&   r   op_setcurrentpoint%T1OutlineExtractor.op_setcurrentpoint  s    {{}Dr   c                &    V P                  4        R # r9   )r  r   s   &&r   r   T1OutlineExtractor.op_endchar
  s    r   c                t    V P                  4       w  r#W0n        W n        W P                  ^,          3V n        R# rz  )r   rl  rQ  r  )r   r   rQ  wxs   &&  r   op_hsbwT1OutlineExtractor.op_hsbw  s/    ++-
!2!21!55r   c                &    V P                  4        R # r9   rV  r   s   &&r   op_sbwT1OutlineExtractor.op_sbw      r   c                n    V P                  4       pV P                  V,          pV P                  V4       R # r9   )r   rM  r   r   s   &&  r   r   T1OutlineExtractor.op_callsubr  s'    HHJ	zz)$Tr   c                    V P                  4       pV P                  4       pV^ 8X  d!   V^8X  d   V P                  4        ^ V n        R# V^8X  d   V^ 8X  d
   ^V n        R# R# R# r   )r   doFlexrP  )r   r   r   nArgss   &&  r   op_callothersubr#T1OutlineExtractor.op_callothersubr  sP    HHJ	
>eqjKKMDL!^
DL !+^r   c                    R # r9   r   r   s   &&r   op_popT1OutlineExtractor.op_pop'  r   r   c                `   V P                  4       pV P                  4       pV P                  4        V P                  4       pV P                  4       pV P                  4       pV P                  4       pV P                  4       pV P                  4       pV P                  4       p	V P                  4       p
V P                  4       pV P                  4       pV P                  4       pV P                  4       pV P                  4       pV P                  4       pV P                  VV,           4       V P                  W,           4       V P                  V4       V P                  V4       V P                  V
4       V P                  V	4       V P                  R 4       V P                  V4       V P                  V4       V P                  V4       V P                  V4       V P                  V4       V P                  V4       V P                  R 4       V P                  V4       V P                  V4       R # r9   )r   r   r  )r   finalyfinalxp3yp3xbcp4ybcp4xbcp3ybcp3xp2yp2xbcp2ybcp2xbcp1ybcp1xrpyrpxs   &                r   ru  T1OutlineExtractor.doFlex*  s   
hhjhhj



hhjhhj



hhjhhj 			%#+		%+		%		%		#		#$ 			%		%		%		%		#		#$ 			&		&r   c                &    V P                  4        R # r9   rV  r   s   &&r   op_dotsection T1OutlineExtractor.op_dotsectionT  rq  r   c                &    V P                  4        R # r9   rV  r   s   &&r   	op_hstem3T1OutlineExtractor.op_hstem3W  rq  r   c           	        ^ RI Hp V P                  4       w  r4rVpW&,          pV P                  P	                  VR4       W',          p	W@P
                  ,           V,
          pV P                  P	                  V	^^ ^ ^WE34       R# )zasb adx ady bchar achar seacr  Nr  )r  r  r   r  r  rQ  )
r   r   r  asbr  r  r  r  r  r  s
   &&        r   op_seacT1OutlineExtractor.op_seacZ  sk    I&*kkm##e$+	i);<&-HHns"kAq!Q+ABr   c                &    V P                  4        R # r9   rV  r   s   &&r   	op_vstem3T1OutlineExtractor.op_vstem3e  rq  r   )r  rP  r  r  rQ  rM  rl  Nr  )r   r   r   r   r   r   r  rp  rZ  rv  r{  r  rc  rf  r   rl  ro  r   rw  rz  ru  r  r  r  r  r   rU  rV  s   @r   rK  rK    su     
'
4$,,!
6
(T	C r   rK  c                      a  ] tR tRt o ]t]! ]4      w  tt	]
t]tRR ltRR ltR tR tR tR tRR	 ltR
 tRR ltR tR tR t]]]3R ltR tR tRR lt R t!Rt"V t#R# )T2CharStringii  Nc                ^    Vf   . pWn         W n        W0n        Ve   TM. V n        R V n        R # r9   )bytecoder   r   r   _cur_vsindex)r   r  r   r   r   s   &&&&&r   r   T2CharString.__init__o  s2    ?G *5*A;r r   c                    V P                   pVf   Q hVe   Wn        M3V P                  f&   \        VR4      '       d   VP                  M^ V n        VP	                  V P                  4      # )Nvsindex)r   r  hasattrr  rD  )r   r  pds   && r   rD  T2CharString.getNumRegionsx  s^    \\~~ '&.5b).D.D

!D 1 122r   c                    V P                   f)   RV P                  P                  \        V 4      3,          # RV P                  P                  \        V 4      3,          # )Nz<%s (source) at %x>z<%s (bytecode) at %x>)r  r`  r   idr   s   &r   __repr__T2CharString.__repr__  sH    == (DNN,C,CRX+NNN*dnn.E.Er$x-PPPr   c                    \         # r9   )ri   r   s   &r   rf   T2CharString.getIntEncoder      r   c                    \         # r9   )rk   r   s   &r   getFixedEncoderT2CharString.getFixedEncoder  r  r   c                    V P                  4       '       g   R # \        V P                  R. 4      pV P                  WP                  V P                  4      pVP                  V 4       R # )NSubrs)r   r   r   decompilerClassr   r   )r   rM  
decompilers   &  r   	decompileT2CharString.decompile  sP    &&((gr2))%1A1A4<<P
4 r   c           	        \        V P                  R . 4      pV P                  VVV P                  V P                  P                  V P                  P
                  V P                  V4      pVP                  V 4       VP                  V n        R# )r  N)r   r   outlineExtractorr   rg  rh  r   rl  )r   r  r   rM  	extractors   &&&  r   drawT2CharString.draw  sr    gr2))LL&&LL&&LL
	 	$__
r   c                R    \        V4      pV P                  V4       VP                  # r9   )r
   r  bounds)r   glyphSet	boundsPens   && r   
calcBoundsT2CharString.calcBounds  s$    h'			)r   c                   V P                   e   R # V P                  pV P                  pV'       d   V'       d   VR,          R9   d   VR R pM0V'       d)   \        VR,          \        4      '       g   \        R4      h. pV P                  4       pV P                  4       p^ p\        V4      pWx8  d   W7,          p	V^,           p\        V	\        4      '       dK    VP                  R W),           4       4       T	R9   d#   TP                  Y7,          4       T^,           pKu  Kw  \        V	\        4      '       d   VP                  V! V	4      4       K  \        V	\        4      '       d   VP                  V! V	4      4       K  Q R\        T	4      ,          4       h \        V4      pT P'                  T4       R #   \         d    \        RT	,          4      hi ; i  \          d    \"        P%                  T4       h i ; i)Nz@T2CharString or Subr has items on the stack after last operator.c              3   8   "   T F  p\        V4      x  K  	  R # 5ir9   )r   ).0rB   s   & r   	<genexpr>'T2CharString.compile.<locals>.<genexpr>  s     #G1GAJJs   zillegal operator: %szunsupported type: %sru   )returnendcharhintmaskcntrmask)r  opcodesr   rO   strr   rf   r  rN   extendr   r~   rz   r@   typer   	TypeErrorr]   errorsetBytecode)
r   isCFF2r  r   r  rc   rk   r   endr   s
   &&        r   compileT2CharString.compile  s   ==$,,,,72;*??!#2,ZS99(R  &&(	**,'lgJEAA%%%QOO#G#GG 44OOGJ/AA 5 E3''	% 01E5))E 23>04;>>q	 *H 	"!   Q01G%1OPPQ  	IIh	s   F7 G 7G"G:c                    V P                   R J# r9   )r  r   s   &r   r   T2CharString.needsDecompilation  s    }}D((r   c                     Wn         R V n        R # r9   )r   r  )r   r   s   &&r   r   T2CharString.setProgram  s    r   c                     Wn         R V n        R # r9   )r  r   )r   r  s   &&r   r  T2CharString.setBytecode  s     r   c                p   V P                   ee   W! V P                   4      8  d   R# V! V P                   V,          4      pV^,           pV P                  V,          pV! WV P                   V4      w  rqM4W! V P                  4      8  d   R# V P                  V,          pV^,           pV! V\        4      pWxV3# )N)NrF   rF   )r  operandEncodingr   r  )	r   r   rN   r   rO   r   r   r   r   s	   &&&&&    r   r   T2CharString.getToken  s    ==$DMM**!!u-.BAIE**2.G"4T]]EBLE5DLL))!!LL'EAIEs+
%''r   c                    V P                   e   W,           pV P                   W pTpMV P                  V,          pV^,           p\        V4      V8X  g   Q hWA3# r9   )r  r   rN   )r   r   nBytesnewIndexbytess   &&&  r   r   T2CharString.getBytes  sW    ==$~HMM%1EELL'EAIE5zV###|r   c                    V# r9   r   )r   r   s   &&r   r   T2CharString.handle_operator  s    r   c                   ^ RI Hp V P                  e   VP                  V P                  4       R# ^ p. p V P	                  V4      w  rgpVf   MV'       d   VR9   df   V P	                  V4      w  rp. p	V F$  p
V	P                  V! \        V
4      ^4      4       K&  	  \        V	4      pRP                  WVV.,           4      pMRP                  WV.,           4      pVP                  V4       VP                  4        . pK  \        V\        4      '       d   \        V^R7      pM\        V4      pVP                  V4       EK  V'       d%   RP                  V4      pVP                  V4       R# R# )rF   )
num2binaryN r5   r  )fontTools.misc.textToolsr  r  dumphexr   r~   r   r	   joinwritenewlinerO   r@   r   r  )r   	xmlWriterttFontr  r   r   r   r   hintMaskbitsbytelines   &&&         r   toXMLT2CharString.toXML  s-   7==$dmm,ED+/==+?(5= 886:mmE6J3e!$,D KK
74=!(DE %-#*4="xxx/@(@A"xxw7OOD)%%'D!%// 1%r J #E
KK& xx~% r   c                   ^ RI HpHp VP                  R4      '       d   V P	                  V! V4      4       R# \        V4      pVP                  4       p. p\        V4      p^ pW8  d1   W8,          p	V^,           p \        V	4      p	VP                  V	4       K6  V P                  V4       R#   \         d     \        T	^R7      p	TP                  T	4        Kv    \         d    TP                  T	4       T	R9   dg   Y8,          p
Rp\        ^ \        T
4      ^4       F$  pT\        T! YT^,            4      4      ,           pK&  	  TP                  T4       T^,           p  K    EK  i ; ii ; i)rF   )
binary2numreadHexrawNr5   r   r  )r  r  r  getr  r	   r|   rN   rz   r~   
ValueErrorr   r   r   r   )r   nameattrscontentr  r  r   r  r   r   mask	maskBytesjs   &&&&         r   fromXMLT2CharString.fromXML"  sA   @99UWW-.'"--/'lgJEAA&E
  u% !  **-e2FE NN5) " "NN5) 88&z$'	!&q#d)Q!7A(1GJtPQTUPU<W4X(XI "8y1E 9"*s7   ;B, ,E,8CE,BE(E,"E,'E((E,)r  r  r   r   r   rl  )NNNNr9   )F)$r   r   r   r   t2OperandEncodingr  rU   t2Operatorsr   r  r   r  r  r  r   rD  r  rf   r  r  r  r  r  r   r   r  rN   r   rO   r   r   r   r  r  r   rU  rV  s   @r   r  r  i  s     'O*;7Iw(O)!3Q!% 
*#X) #&w: ( 	$&L !  !r   r  c                   h   a a ] tR tRt o]t]! ]4      w  tt	RV 3R llt
R tR tR tR tRtVtV ;t# )	T1CharStringiE  c                2   < \         SV `  W4       W0n        R # r9   )r_  r   rM  )r   r  r   rM  r`  s   &&&&r   r   T1CharString.__init__I  s    +
r   c                    \         # r9   )encodeIntT1r   s   &r   rf   T1CharString.getIntEncoderM  r  r   c                    R  pR# )c                     \        R 4      h)z8Type 1 charstrings don't support floating point operands)r  )r   s   &r   rk   1T1CharString.getFixedEncoder.<locals>.encodeFixedQ  s    VWWr   Nr   )r   rk   s   & r   r  T1CharString.getFixedEncoderP  s    	Xr   c                    V P                   f   R # . p^ p V P                  V4      w  r4pVf   MVP                  V4       K-  V P                  V4       R # r9   )r  r   r~   r   )r   r   r   r   r   s   &    r   r  T1CharString.decompileT  sO    == '+}}U';$Eu}NN5! r   c                t    \        WP                  4      pVP                  V 4       VP                  V n        R # r9   )rK  rM  r   rl  )r   r  r  s   && r   r  T1CharString.draw`  s)    &sJJ7	$__
r   )rM  rl  )NNN)r   r   r   r   t1OperandEncodingr  rU   t1Operatorsr   r  r   rf   r  r  r  r   rU  rb  rc  s   @@r   r  r  E  s8     'O*;7IwX
!% %r   r  c                   p   a  ] tR tRt o ]tRR ltR tR tR t	R t
R tR	 tR
 tR tR tR tR tRtV tR# )DictDecompilerif  Nc                :    . V n         Wn        / V n        W n        R # r9   )r   stringsdictparent)r   r  r  s   &&&r   r   DictDecompiler.__init__i  s    
	r   c                \    \        V P                  4      ^ 8X  g   Q R4       hV P                  # )rF   znon-empty stack)rN   r   r  r   s   &r   getDictDictDecompiler.getDicto  s(    4::!#6%66#yyr   c                    ^ p\        V4      pV P                  P                  pW#8  dI   \        W,          4      pV^,           pV P                  V,          pV! WW4      w  rrVf   KD  V! V4       KN  R# r   )rN   r   r~   r   r  )r   r   r   lenDatar   r   r   r   s   &&      r   r  DictDecompiler.decompiles  si    d)zz  o%BAIE**2.G"4T9LE U r   c                F    V P                   R,          pV P                   R V# r   r   r   s   & r   r   DictDecompiler.pop  s    

2JJrNr   c                F    V P                   R ,          pV P                   R  V# r   r%  r   s   & r   r   DictDecompiler.popall  s    zz!}JJqMr   c                x   Vw  r\        V\        4      '       dS   Rp\        \        V4      ^,
          RR4       F.  pW$,          p\	        V RV,           4      pV! V4      3V,           pK0  	  M\	        V RV,           4      pV! V4      pVR8X  d   V P
                  P                  V4       R# W0P                  V&   R# )rM   arg_blendNr   ru   )rO   rP   r   rN   r   r   r  r  )r   r   argTyper   r   rA  
arghandlers   &&     r   r   DictDecompiler.handle_operator  s    $gu%%E3w<!+R4j$T6C<8
#H-/%7 5
 !v'78Jx(EwJJe$"'IIhr   c                    \        V P                  ^ ,          \        4      '       d   V P                  V P                  4      pV# V P	                  4       pV# r  )rO   r   listarg_blend_numberr   )r   r  outs   && r   
arg_numberDictDecompiler.arg_number  sD    djjmT**''

3C 
 ((*C
r   c                    . pV P                  4       p\        V4      pVP                  V4       VP                  R 4       V P                  4       pV# )r+  )r   rN   r~   r   )r   r  r2  	blendArgs
numMastersdummys   &&    r   r1  DictDecompiler.arg_blend_number  sD    HHJ	^


9

7r   c                D    V P                   V P                  4       ,          # r9   )r  r   r   r  s   &&r   arg_SIDDictDecompiler.arg_SID  s    ||DHHJ''r   c                "    V P                  4       # r9   rV  r;  s   &&r   	arg_arrayDictDecompiler.arg_array  rX  r   c                   V P                   P                  R^ 4      pV P                  P                  V4      ^,           pV P	                  4       pV P                  4       p\        V4      pWcV,          8X  g   Q hR.V,          pV^,
          p^ p	^ p
W8  dB   WY,          V
,           pTp
WIV,          ,           pV.W\W,            ,           pWV	&   V	^,          p	KG  V# )a  
There may be non-blend args at the top of the stack. We first calculate
where the blend args start in the stack. These are the last
numMasters*numBlends) +1 args.
The blend args starts with numMasters relative coordinate values, the  BlueValues in the list from the default master font. This is followed by
numBlends list of values. Each of  value in one of these lists is the
Variable Font delta for the matching region.

We re-arrange this to be a list of numMaster entries. Each entry starts with the corresponding default font relative value, and is followed by
the delta values. We then convert the default values, the first item in each entry, to an absolute value.
r  N)r  r  r  rD  r   r   rN   )r   r  r  r7  rE  r   numArgsr   	numDeltasr   prevValnewValmasterOffset	blendLists   &&            r   arg_blendListDictDecompiler.arg_blendList  s     ))--	1-KK%%g.2 	 HHJ	{{}d)y0000"N	mWw&FG$I6L4|7O#PPI !HFAr   c                    V P                  4       p. pV'       d"   \        V^ ,          \        4      '       d   TpV# ^ pV F  pWE,           pVP                  V4       K  	  V# r  )r   rO   r0  r~   )r   r  	valueListr2  currentvs   &&    r   	arg_deltaDictDecompiler.arg_delta  s\    KKM	IaL$77C 
	 G!+

7#  
r   )r  r  r   r  r9   )r   r   r   r   cffDictOperandEncodingr  r   r  r  r   r   r   r3  r1  r<  r?  rH  rN  r   rU  rV  s   @r   r  r  f  sL     ,O


( ( D r   r  c                 L    \        V 4      pVR 8  d   ^kpV# VR8  d   RpV# RpV# )i  il  r\   i   )rN   )rM  nSubrsbiass   &  r   r   r     s?    ZF}
 K	 
% K Kr   )rp   123456789rq   rr   rs   Nrn   rM   hstemrm   vstemrE  vmoveto   rlineto   hlinetor   vlineto   	rrcurveto
   callsubr   r     r  )   r  )   r+  )   hstemhm)   r  )   r     rmoveto   hmoveto)   vstemhm)   
rcurveline)   
rlinecurve)   	vvcurveto)   	hhcurveto)   	callgsubr   	vhcurveto   	hvcurveto)r   rF   ignore))r   rm   and))r   rE  or))r   rd  not))r   rl  store))r   	   r	  ))r   ro  add))r   rr  sub)r   r   div))r      load))r   rt  neg))r   ru  eq))r   rw  drop))r   rz  put))r   r|  r  ))r   r  ifelse))r   r  random))r   r  mul))r   r  sqrt))r   r  dup))r      rZ  ))r   r  r   ))r   r  roll))r   "   hflex))r   #   flex))r   $   hflex1))r   %   flex1)r]  r_  ra  rc  rf  ri  rk  )r  	closepathrn  rq  )r  hsbwrs  r{  r~  r  r  )r  
dotsection))r   rM   vstem3))r   rK   hstem3))r   rg  seac))r   r   sbwr  ))r   rv  callothersubr))r      r   ))r   !   setcurrentpoint):__doc__fontTools.misc.fixedToolsr   r   r   r   r  r   r   r   r	   fontTools.pens.boundsPenr
   r,   logging	getLoggerr   r]   r   r   r%   r(   r/   r3   r7   r<   rE   r  rN   r  rP  r?   	enumerater   
maxOpStackrU   r  rf   encodeIntCFFr  ri   r`   rk   rv   r   	Exceptionr   objectr   r  rY  re  r  rK  r  r  r  r   )r   rM  s   00r   <module>r     sz    J I .   !2
3


<
!
   FSL -0 $ %)4 & 'N+;; ' 'N+;; ' % # 
$ $$%a( % " ' # *1- ) r , r + s " %.k$:;$:DA14$:;
88 8 	8
 8 8 8 8 8 8 8 8 8 8 8  !8" #8$ %8& '8( )8* +8, -8. /82 384 586 788 98< =8> ?8@ A8B C8D E8F G8H I8J K8L M8N O8P Q8R S8T U8V W8X Y8Z [8\ ]8^ _8` a8b c8d e8f g8h i8j k8l m8n o8v1h U#D!D!  + gcl*1h	Y 	G9 G9T<, 0) 0fa) aHV+ VrY!6 Y!x%< %BvV vrQ+ <s   "H