+
    i                        R t ^RI5 ^RIHt ^RIHt ^ RIHtHt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 ^ R
IHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI H!t!H"t"H#t# ^ RI$t$^ RI%t%]$PL                  ! R4      t'Rt(Rt)Rt*Rt+ ! R R4      t,R%RRR](R])R]+RRR. /R llt-]! ]-4      R  4       t.R! t/R" t0R&R# lt1]2R$8X  d,   ^ RI3t3]1! 4       t4]3Pj                  ! ]6! ]7! ]44      4      4       R# R# )'z
Tool to find wrong contour order between different masters, and
other interpolatability (or lack thereof) issues.

Call as:
$ fonttools varLib.interpolatable font1 font2 ...
)*)test_contour_order)test_starting_point)RecordingPenDecomposingRecordingPenlerpRecordings)TransformPen)StatisticsPenStatisticsControlPen)OpenContourError)piecewiseLinearMapnormalizeLocation)floatToFixedToStr)	Transform)defaultdict)SimpleNamespace)wraps)pformat)sqrtatan2piNzfontTools.varLib.interpolatablegffffff?g      ?gMb`?i  c                   @   a  ] tR t^'t o RtR tR tR tRR ltRt	V t
R# )	Glyphc                r    Wn         V P                   F  p\        W. 4       K  	  V P                  V4       R # N)nameITEMSsetattr	_populate)self	glyphnameglyphsetitems   &&& /Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/fontTools/varLib/interpolatable.py__init__Glyph.__init__4   s+    	JJDD# x     c                    V P                    F8  p\        \        W4      4      V8X  g   K  \        W4      P                  R 4       K:  	  R # r   )r   lengetattrappend)r   ixr"   s   && r#   _fill_inGlyph._fill_in:   s5    JJD74&'2-#**40 r&   c                   WP                   ,          pVR J V n        V P                  '       d   R # \        \        VR7      p VP	                  VRR7       VP                  V n        ?\        V P                  4       EF  w  rEVP                   UUu. uF  w  rgVNK	  	  pppV P                  P                  V4       \        VR7      p	\        VR7      p
 VP                  V	4       VP                  V
4       V P                  P                  R4       T P"                  P                  T	4       T P$                  P                  T
4       T P&                  P                  \)        T	4      4       T P*                  P                  \)        T
4      4       T^ ,          R8X  d   T P!                  T4       EK6  T^ ,          R8X  g   Q hTR,          R9   g   Q h\-        4       p\/        TR4      pTP                  T4       T P0                  P                  TP                  4       . pT P2                  P                  T4       \5        TP                  TR4       \5        TP                  TR4       EK  	  R #   \
         d    TP	                  T4        EL:i ; iu uppi   \         d9   pT P                  P                  R4       T P!                  T4        R p?EK[  R p?ii ; i)	Nr!   T)outputImpliedClosingLineFaddComponentmoveTo)	closePathendPath)r   doesnt_existPerContourOrComponentPenr   draw	TypeErrorvalue
recordings	enumerate	nodeTypesr*   r	   r
   replayopenContoursr   r,   
greenStatscontrolStatsgreenVectorscontour_vector_from_statscontrolVectorsSimpleRecordingPointPenSegmentToPointPenpointsisomorphismsadd_isomorphisms)r   r!   glyphperContourPenr+   contouropargr=   r@   rA   erG   	converterrH   s   &&             r#   r   Glyph._populate?   sJ   #!TM0Q	&JJ}tJD (--$T__5KB+2==9==I9NN!!),&9J/BLz*|,!!((/
 OO"":.$$\2$$%>z%JK&&'@'NO |~-b!Q<8+++R=$<<<<,.F)&%8INN9% KKv||,L$$\2 V\\<?V\\<>Q 6  	&JJ}%	& : $ !!((.b!s0   I0 J=J0JJK$,KKNc                    Vf'   V P                    F  pVP                  V4       K  	  R # V P                   V,          P                  V4       R # r   )r;   r8   )r   pencountor_idxrL   s   &&& r#   r8   
Glyph.draww   s;    ??S! + OOK(--c2r&   )r6   r   r;   )	r;   r@   rA   rB   rD   r=   rH   rG   r?   r   )__name__
__module____qualname____firstlineno__r   r$   r,   r   r8   __static_attributes____classdictcell__)__classdict__s   @r#   r   r   '   s&     
E!1
6?p3 3r&   r   F	locations	tolerance	kinkinessupemshow_alldiscrete_axesc             #     a a\"   V^
8  d
   VR,          p^ Tu;8:  d	   ^8:  g   Q h Q hV^
8  d
   VR,          p^ V8:  g   Q hT;'       g    S  U
u. uF  p
\        V
4      NK  	  up
pVf)   S  UU
u0 uF  qP                  4        F  qkK  	  K  	  ppp
\        S WIR7      w  o\pV V\3R lpV EF  p\        P	                  RV4       S  Uu. uF  p\        W4      NK  	  pp\        V Uu. uF  pVf   K	  ^NK  	  up4      ^8:  d   K\  \        \        VS V4      4       F  w  pw  pppVP                  '       d%   V'       g   VR\        P                  RVRV/3x  K@  R	p\        VP                  4       F.  w  ppV'       g   K  R
pVR\        P                  RVRVRV/3x  K0  	  V'       g   K  K  	  R.\        S 4      ,          pV EF  pVV,          pVe   VP                  '       g   K%  V! VV4      pVf   K4  VV,          pVe   VP                  '       g   KU  VP                  pVP                  p\        V4      \        V4      8w  dE   VR\        P                  RVV,          RVV,          RVRVR\        V4      R\        V4      /3x  K  VV8w  d   \        \        VV4      4       F  w  pw  ppVV8X  d   K  \        V4      \        V4      8w  dG   VR\        P                   RVRVV,          RVV,          RVRVR\        V4      R\        V4      /3x  Kq  \        \        VV4      4       FF  w  p w  p!p"V!V"8w  g   K  VR\        P"                  RVRV RVV,          RVV,          RVRVRV!RV"/	3x  KH  	  K  	  \%        VV4      w  p#p$V#V8  dS   VR\        P&                  RVV,          RVV,          RVRVR\)        \+        \        V$4      4      4      RV$RV#/3x  V$VV&   VP,                  p%VP,                  p&VP.                  p'VP.                  p(VP0                  p)VP0                  p*VV,          p$V$eQ   V&'       dI   V$ U+u. uF  p+V&V+,          NK  	  p&p+V$ U+u. uF  p+V(V+,          NK  	  p(p+V$ U+u. uF  p+V*V+,          NK  	  p*p+. p,\        V)V*4       FP  w  p-p. \3        4       p/\)        \5        V-P6                  V.P6                  4      4      V/n        V,P9                  V/4       KR  	  \        \        V%V&4      4       EFR  w  pw  p0p1V0e.   V1e*   \        V04      ^ 8X  g   \        V04      \        V14      8w  d   K=  \=        VVVVV$4      w  p#p2p3V#V8  d7   VR\        P>                  RVRVV,          RVV,          RVRVR^ RV2RV3RV#/
3x  V,V,          p4V4'       g   K  V'V,          ^ ,          ^ 8  V(V,          ^ ,          ^ 8  8X  g   K  \A        RR7      p5V4PC                  V54       \E        V54      p6V'V,          p7V(V,          p8V7^ ,          V7^ ,          ,          p9V8^ ,          V8^ ,          ,          p:V6^ ,          V6^ ,          ,          p;\        \        PF                  \        PH                  34       F  w  p<p=V<'       d   \K        V9V:4      p>K  \M        V9V:,          4      p>\        PO                  RV=V;V>V9V:4       V<'       g   V>V,          V;R,           8  g"   V<'       g   Ko  RV>V,          ,           V;8  g   K   V<'       d   V>V;,          p#M
V;V>,          p# \        PO                  RV#4       VRV=RVRVV,          RVV,          RVRVRV#/3x  K  	  EKU  	  VPR                  pVPR                  pVV,          e(   V'       d    VV,           U+u. uF  p+VV+,          NK  	  pp+Rp?V\T        ,          \V        ,          V,          p@\        \        VV4      4       EFA  w  pw  p0p1V0e.   V1e*   \        V04      ^ 8X  g   \        V04      \        V14      8w  d   K=  \+        \        V04      4       EF  p+V0V+,          pAV1V+,          pBVA^,          '       d   XB^,          '       g   K6  V0V+^,
          ,          pCV1V+^,
          ,          pDV0V+^,           \        V04      ,          ,          pEV1V+^,           \        V14      ,          ,          pFVC^,          '       d   XD^,          '       d   K  XC^,          '       d   XD^,          '       d   K  \Y        XA^ ,          !  pA\Y        XB^ ,          !  pB\Y        XC^ ,          !  pC\Y        XD^ ,          !  pD\Y        XE^ ,          !  pE\Y        XF^ ,          !  pFVAVC,
          pGVEVA,
          pHVBVD,
          pIVFVB,
          pJVGPZ                  VHP\                  ,          VGP\                  VHPZ                  ,          ,
          pKVIPZ                  VJP\                  ,          VIP\                  VJPZ                  ,          ,
          pL VK\_        VG4      \_        VH4      ,          ,          pKVL\_        VI4      \_        VJ4      ,          ,          pL\_        XK4      T?8  g   \_        XL4      T?8  d   EK@  XGPZ                  XHPZ                  ,          TGP\                  THP\                  ,          ,           pMXIPZ                  XJPZ                  ,          TIP\                  TJP\                  ,          ,           pNTM^ 8  g   XN^ 8  d   EK  \_        XG4      \_        TG4      \_        XH4      ,           ,          pO\_        XI4      \_        TI4      \_        XJ4      ,           ,          pP\_        TOTP,
          4      pQ\_        TQ4      T?8  d   EKJ  XAXB,           ^,          pRXCXD,           ^,          pSXEXF,           ^,          pTTRTS,
          pUTTTR,
          pVTUPZ                  TVP\                  ,          TUP\                  TVPZ                  ,          ,
          pW TW\_        TU4      \_        TV4      ,          ,          pW\_        XW4      YV,          ,          T?8:  d   EK  XW\_        XU4      ,          \_        XV4      ,          pX\_        TUTV,           4      pY\_        TXTY,          4      pZTZX@8  d   EK^  XZXY,          p[T[T?8  d   EKq  T?\_        XW4      T,          ,          p#\        PO                  RXZX[TWXQ4       \        PO                  RT#4       TR\        P`                  RTRTT,          RTT,          RTRTRT+RT#/3x  EK  	  EKD  	  V'       g   EKf  VR\        Pb                  RVV,          RVV,          RVRV/3x  EK  	  EK  	  R# u up
i u up
pi u upi u upi u up+i u up+i u up+i   \:         d    T,P9                  R4        E	K  i ; i  \P         d    ^ p# ELi ; iu up+i   \P         d     EK  i ; i  \P         d     EK  i ; i5i)
   g{Gz?N)rb   c                    < V f   R # SV ,          p V f   R # SV ,          e   SV ,          V,          f   SV ,          p K(  V # r    )ir    	glyphsetsparentss   &&r#   grand_parenttest_gen.<locals>.grand_parent   sB    9AJ9aj$1i)@)H
Ar&   zTesting glyph %stypemaster
master_idxFTrL   master_1master_2master_1_idxmaster_2_idxvalue_1value_2pathnoder^   reversedr/   z;%s: actual size %g; threshold size %g, master sizes: %g, %ggh㈵>ztolerance %gg?z=kink: deviation %g; deviation_ratio %g; sin_mid %g; r_diff %gr:   )2reprkeysfind_parents_and_orderloginfor   r(   r<   zipr6   InterpolatableProblemMISSINGr?   	OPEN_PATHr=   
PATH_COUNT
NODE_COUNTNODE_INCOMPATIBILITYr   CONTOUR_ORDERlistrangerH   rB   r;   r   r   r:   r*   
ValueErrorr   WRONG_START_POINTr	   r>   rC   UNDERWEIGHT
OVERWEIGHTmaxr   debugZeroDivisionErrorrG   DEFAULT_KINKINESS_LENGTHDEFAULT_KINKINESScomplexrealimagabsKINKNOTHING)]rh   glyphsnamesignore_missingr]   r^   r_   r`   ra   rb   gr!   orderrj   
glyph_name	allGlyphsrJ   rn   r   has_openr+   open	matchingsm1idxglyph1m0idxglyph0m1m0pathIxnodes1nodes2nodeIxn1n2this_tolerancematchingm0Isomorphismsm1Isomorphisms	m0Vectors	m1Vectors
recording0
recording1rg   midRecordingc0c1rcontour0contour1proposed_pointreverserL   midStats	midVectorm0Vecm1Vecsize0size1midSize
overweightproblem_typeexpectedSizetdeviation_thresholdpt0pt1pt0_prevpt1_prevpt0_nextpt1_nextd0_prevd0_nextd1_prevd1_nextsin0sin1dot0dot1r0r1r_diffmidmid_prevmid_nextmid_d0mid_d1sin_midcrossarc_len	deviationdeviation_ratiori   s]   f&&&$$$$$$                                                                                  @r#   test_genr      s     BT		QBT		>>11y1y!d1gy1E~ %.GI}}!!!IG+9NGU 
#Z0AJKXU:0	Ky>yeEy>?1D3<	9e,4
/J/$ !!!%""$9$A$A$d(*  H%e&8&89D 5 ? ? $$j!2	 	 : x=4
@ FS^+	Eu%F~V%5%5%5 
3E}u%F~V%5%5%5 !!B!!B2w#b'! 5 @ @"E%L"E%L&&!3r7!3r7  Rx09#b"+0F,F,VV' 6{c&k1& &(=(H(H & *E%L *E%L . . )3v; )3v;	  !,5c&&6I,J(R8 *$*,A,V,V$*F$*F$.e$.e$2E$2E$-r$-r
!"#  %! -K% 1GP (:&&'I$NH	) 5 C C"E%L"E%L&&!4c(m(<#=!8#^	  $,	%  $00N#00N++I++I**J**J !'H$=E!FX."3"3X!F3;<8aYq\\8	<5=>XjmmX
>Lj*5B.$A">"((BHH#EFAG ''*	 6 -6NN3-((Xx $'8})8}H5 :MFB	8;7 "I-""$9$K$K%r&e&e*E*E%q%~&' . 'r*7	"a 01 4)B-:JQ:NO,d;HNN8, 9( CI%bME%bME!!HuQx/E!!HuQx/E'lYq\9G4=1==1<<50
L &+.ue+<L$+/+>L		Y(#(!! !+|i/G'TX./X(jTL94L-Lw-V3#-5AG5KN5<|5KN  IInnE *$*L$-r$.e$.e$2E$2E$/!"# A5o-N BB +%.u%56%5bee%56A//2CCiO   -6c"bk,B((Xx$'8})8}H5 
 s8}-A"1+C"1+Cq66Q 'AH'AH'Q#h-(?@H'Q#h-(?@H{{x{{ {{x{{ !3q6*C!3q6*C&4H&4H&4H&4H "HnG&nG!HnG&nG"<<',,69TTD"<<',,69TTD!Gs7| ;;Gs7| ;; 4y1}D	A  #<<',,69TTD"<<',,69TTDax4!8  WWG)DEBWWG)DEB b\F6{Q 9/C (8 3q8H (8 3q8H 8^F%^F$kkFKK7&++:SSG!3v;V#<<
 7|y'<=B  $c&k1CK?E!&6/2G #EGO 4I #66 &/'&9O&* %&#g,*B%CNIIW!' IInn=""$9$>$>%r&e&e*E*E#Q'	 E . -CD x 5 = ="E%L"E%L&&	 	] O + 2
 H$ L>\ "G<> " . ''--.p $5 31230 7t - ! !@ - ! !s  Aw/w/u($w/0 u-:w/
u3w/)u8
4u8
:Aw/A*w/1;w/-/w/D&w/D w/	w/u=w/%v7w/=vw/&A	v/B4w/(&w/C7w/w/*w/v0
	v0w/	v0A,w/
w/w'B<w/$A?w/$w/5w/Dw/	Aw	F.w/<"wDw/0Aw/v-	(w/,v-	-w/0w=w/ ww/	ww/ww/w,'w/+w,,w/c                  z    \        \        4      p\        V / VB  F  w  r4W#,          P                  V4       K  	  V# r   )r   r   r   r*   )argskwargsproblemsr    problems   *,   r#   testr   I  s9    4 H&77	""7+ 8Or&   c                     W9   d   R # W ,          W&   \        W0,          R. 4       F  p\        VP                  WV4       K  	  R # )N
components)r)   recursivelyAddGlyph	glyphName)r    r!   
ttGlyphSetglyf	components   &&&& r#   r   r   Q  s>    $/HT_lB?	I//tL @r&   c                     \         P                  P                  V 4      pV'       d   \         P                  ! VR R7       V # )T)exist_ok)osru   dirnamemakedirs)ru   r   s   & r#   ensure_parent_dirr   Z  s*    ggood#G
Gd+Kr&   c                .0  aabac ^ RI p^ RIpVP                  R\        P                  R7      pVP                  RRRR7       VP                  RR	R
R7       VP                  RR\        R\        ,          R7       VP                  RR\        R\        ,          R7       VP                  RR	RR7       VP                  RRRR7       VP                  RRRR7       VP                  RRRR7       VP                  RR	RR7       VP                  RRRR7       VP                  RR	RR7       VP                  RR\        R R!R"7       VP                  R#R$\        R%R&R'7       VP                  R(R)R	R*R7       VP                  R+R	R,R7       VP                  V 4      p ^ R-IHp T! V P                  '       d   R.MR/R07       V P                  '       d
   V! R1R07       V P                  '       d   V P                  P!                  4       MRp^ R2IHp . p. p. p	\'        4       p
\(        p\+        V P,                  4      p\/        V P,                  4      ^8X  E	d   RpV P,                  ^ ,          P1                  R34      '       Ed   ^ R4IHp VP7                  V P,                  ^ ,          4      pVP8                   Uu. uF  qP:                  NK  	  upV n        VP8                   Uu. uF  qP<                  NK  	  p	pVP>                   Uu0 uF#  p\A        VR54      '       d   K  VPB                  kK%  	  p
pVP>                   Uu/ uFD  pVPB                  V
9  g   K  VPB                  VPD                  VPF                  VPH                  3bKF  	  ppVP>                   Uu/ uF  pVPB                  VPJ                  bK  	  upocVPM                  4        UaUu/ uF;  w  opS\*        ;QJ d    . VcV3R6 lV 4       F  NK  	  5M! VcV3R6 lV 4       4      bK=  	  pppEM\V P,                  ^ ,          P1                  R4      '       Ed   ^ R7I'H(pH)p V! V P,                  ^ ,          4      pVPT                  pV! V4      pVP8                   Uu. uF  pVPV                  NK  	  ppV Uu. uF4  pVPX                  PZ                  : R8VPX                  P\                  : 2NK6  	  pp. V n        VP8                   Uu. uF  qP<                  NK  	  p	pVP>                   Uu/ uF1  pVPB                  VPD                  VPF                  VPH                  3bK3  	  ppVP>                   Uu/ uF  pVPB                  VPJ                  bK  	  upocVPM                  4        UaUu/ uF;  w  opS\*        ;QJ d    . VcV3R9 lV 4       F  NK  	  5M! VcV3R9 lV 4       4      bK=  	  pppEMV P,                  ^ ,          P1                  R:4      '       g*   V P,                  ^ ,          P1                  R;4      '       EdL   ^ R<I/H0p V! V P,                  ^ ,          4      pVR=,          Pb                  pVR>,          p/ obVP>                   F6  pRVPd                  ^ VPf                  ^VPh                  /SbVPj                  &   K8  	  R?pR@V9   d   VR@,          p\m        VPn                  RAR4      '       d   Sb Uu/ uF  pVRR^ ^ ^^/bK  	  upobRBpMkVPp                  PM                  4        FM  w  p p!SbV ,          Ps                  4       p"V!PM                  4        F  w  p#p$\u        V#V"4      SbV ,          V$&   K  	  KO  	  / p%\w        \x        4      p&RCV9   d   VRC,          p'VRD,          p(Vf$   \{        V'P|                  P                  4       4      pV F  p)V'P|                  V),           F  p*/ p+. p,\{        V*P>                  PM                  4       4       F,  w  pp-V-^,          V+V&   V,P                  VV-^,          34       K.  	  \+        V,4      p.V.V%9  d   VP                  V+RBR?RE7      V%V.&   \        V)V&V.,          V%V.,          V(4       K  	  K  	  EMRFV9   Ed   VR>,          P>                  p/VRF,          P                  P                  ^ ,          p0V0P                  p1Vf   \{        V1P                  4       4      pV EF  p)V1V),          p2V2P                  p3\m        V3RG^ 4      0p4\m        V3RG^ 4      p5^ p6\        V2P                  4       F?  p7V7RH8X  d   V4P                  V54       M!V7RG8X  d   \        V6\        4      '       g   Q hT6p5T7p6KA  	  \A        V3RI4      '       g   K  V3P                  P                  p8V4 F  p5V8P                  V5,          p9V9P                   F  p:V8P                  P                  V:,          p;/ p+. p,\        V;P                  4       F=  w  p<pV/V<,          Pj                  pVP                  p-V-V+V&   V,P                  VV-34       K?  	  \+        V,4      p.V.V%9  d   VP                  V+RBR?RE7      V%V.&   V&V.,          p=V%V.,          V),          V=V)&   K  	  K  	  EK  	  RJ.pVP                  4       .p/ .p	\{        SbP                  4       4       Uu/ uF  pVRbK  	  pp\{        V&P                  4       RK RL7       F  p.RMRNP                  Vb3RO lV. 4       4      ,           RM,           p>V'       d
   V>RP,          p>VP                  V>4       VP                  V&V.,          4       V	P                  \y        V.4      4       K  	  RBV nU        . V n        V	'       g   V U?u. uF  p?/ NK  	  p	p?V P,                   F  p@V@P1                  RQ4      '       dH   ^ RRIVHWpA VA! X@4      p\        4       pBVP                  VB4       VBPb                  pVP                  V4       M2^ R<I/H0p V! X@4      pVR=,          Pb                  pVP                  V4       VP                  V! X@4      P                  RS^4      ^ ,          4       K  	  \/        V4      ^8  d   \        P                  RT4       R# . p&V F_  p\A        VRU4      '       d   VP                  4       p=MTp=T&P                  V=P                  4        Uu/ uF  pVV=V,          bK  	  up4       Ka  	  V PB                  '       d   \'        V PB                  4      pC\        VV&4       U>U=u. uF  w  p>p=V>XC9   g   K  V=NK  	  p&p>p=\        W4       U>U#u. uF  w  p>p#V>XC9   g   K  V#NK  	  p	p>p#V U>u. uF  p>V>XC9   g   K  V>NK  	  pp>V'       g>   \{        \'        V& U=UDu. uF  p=V=P                  4        F  pDVDNK  	  K  	  upDp=4      4      p\'        V4      pEV& F=  p=\'        V=P                  4       4      pFXEVF,
          pGVG'       g   K/  XG F  pDRV=VD&   K
  	  K?  	  V	 U,UUHu. uF@  p,/ \        V,X4      CV,PM                  4        UUHu/ uF  w  ppHVV
9   g   K  VXHbK  	  upHpCNKB  	  p	pp,pHV P                  ;'       g    \        pIV P                  e   V P                  M\        pJ \        PY                  RV\/        V&4      4       \        PY                  RW\        V	4      4       \        V&VVV	VV P                  XIVJV P                  V
RX7
      pK\w        \        4      pLV P                  f   VP                  M\        \        V P                  4      RY4      pV P                  '       Egz   V P                  '       dG   ^ RIjpMXK F  w  p)pNXLV),          P                  VN4       K   	  \        XMP                  XL4      VRZ7       EMERpOXK EF  w  p)pPXLV),          P                  VP4       V)XO8w  d   \        R[V) R\2VRZ7       T)pORpQR]XP9   d   XPR],          3MXPR^,          VPR_,          3pRVRXQ8w  dI   R`XP9   d   XPR`,          3MXPRa,          VPRb,          3pS\        RcRdP                  VS4      ,          VRZ7       XRpQXPRe,          \        P                  8X  d   \        RfXPR`,          ,          VRZ7       K  XPRe,          \        P                  8X  d   \        RgXPR`,          ,          VRZ7       EK   XPRe,          \        P                  8X  d8   \        RhXPRi,          VPRa,          VPRj,          VPRb,          3,          VRZ7       EKs  XPRe,          \        P                  8X  d@   \        RkXPRl,          VPRi,          VPRa,          VPRj,          VPRb,          3,          VRZ7       EK  XPRe,          \        P                  8X  dH   \        RmXPRn,          VPRl,          VPRi,          VPRa,          VPRj,          VPRb,          3,          VRZ7       EK1  XPRe,          \        P                  8X  d=   \        RoXPRi,          : RpVPRa,          : RdVPRj,          : RpVPRb,          : 2VRZ7       EK  XPRe,          \        P                  8X  dH   \        RqXPRr,          VPRi,          VPRa,          VPRj,          VPRb,          VPRs,          3,          VRZ7       EK  XPRe,          \        P                  8X  d0   \        RtXPRr,          VPRa,          VPRb,          3,          VRZ7       EK7  XPRe,          \        P                  8X  d0   \        RuXPRr,          VPRa,          VPRb,          3,          VRZ7       EK  XPRe,          \        P                  8X  d8   \        RvXPRr,          VPRw,          VPRa,          VPRb,          3,          VRZ7       EK  XPRe,          \        P                  8X  g   EK  \        RxXPRa,          : RyVPRb,          : 2VRZ7       EK  	  M$XK F  w  p)pNXLV),          P                  VN4       K   	  \        XL4      pLR EF  pP\m        V VP4      pTVTf   K  \        PY                  R{XPP                  4       XT4       ^R|I{H|pUH}pV VPRz8X  d   XUMXVpWVW! \        XT4      V&VR}7      ;_uu_ 4       pXVXP                  VXIXJR~7       XL'       d   XXP                  XL4       XXEP                  XL4       VL'       g$   V P                  '       g   XXEP                  4        XL'       d#   XXEP                  4        VXEP                  4        RRR4       EK
  	  V EP                  '       Ed   \        PY                  RV EP                  4       ^RI{HpY . pZ/ p[VY! VZV&VR}7      ;_uu_ 4       p\V\P                  VR?XIXJR7       XLPM                  4        F+  w  p]p^V]X[\/        XZ4      &   X\EP                  V]V^/R?R?R7       K-  	  XL'       g$   V P                  '       g   X\EP                  4        RRR4       ^ RIp_\        \        V EP                  4      R4      ;_uu_ 4       pVEP                  R4       VEP                  R4       VEP                  R4       \        XZ4       F  w  p`p\V`X[9   d.   VEP                  RX[X`,           R2EP                  R4      4       VEP                  REP                  R4      4       VEP                  X_EP                  X\4      4       VEP                  R4       VEP                  R4       K  	  VEP                  R4       RRR4       M XL'       d   XL# R# u upi u upi u upi u upi u upi u uppi u upi u upi u upi u upi u upi u uppi u upi u upi u up?i u upi u up=p>i u up#p>i u up>i u upDp=i u upHpi u upHpp,i   + '       g   i     EK  ; i  + '       g   i     EL; i  + '       g   i     L; i  E\         d7   paTa;EP                  T,          un        \        EP                  Ta4       h Rpa?aii ; i)z/Test for interpolatability issues between fontsNzfonttools varLib.interpolatable)descriptionz--glyphsstorez&Space-separate name of glyphs to check)actionhelpz
--show-all
store_truez3Show all glyph pairs, even if no problems are foundz--tolerancez,Error tolerance. Between 0 and 1. Default %s)r   rl   r   z--kinkinessz)How aggressively report kinks. Default %sz--jsonzOutput report in JSON formatz--pdfzOutput report in PDF formatz--psz"Output report in PostScript formatz--htmlzOutput report in HTML formatz--quietz%Only exit with code 1 or 0, no outputz--outputz3Output file for the problem report; Default: stdoutz--ignore-missingz<Will not report glyphs missing from sparse masters as errorsinputsFILE+zSInput a single variable font / DesignSpace / Glyphs file, or multiple TTF/UFO files)metavarrl   nargsr   z--nameNAMEr*   zGName of the master to use in the report. If not provided, all are used.)r   rl   r   r   z-vz	--verbosezRun verbosely.z--debugzRun with debug output.)configLoggerINFOWARNING)levelDEBUG)basenamez.designspace)DesignSpaceDocumentminimumc              3   \   <"   T F!  p\        V\        SS,          4      4      x  K#  	  R # 5ir   r   dict.0vaxis_mappingsks   & r#   	<genexpr>main.<locals>.<genexpr>  (     SPR1+AtM!4D/EFFPR   ),)GSFontto_designspace-c              3   \   <"   T F!  p\        V\        SS,          4      4      x  K#  	  R # 5ir   r  r  s   & r#   r  r    r  r  z.ttfz.otf)TTFontheadfvarFavarVarStoreTgvarr   )location
normalizedrecalcBoundsCFF2vsindexblendvstorez''c                     \        V 4      V 3# r   )r(   )r  s   &r#   <lambda>main.<locals>.<lambda>e  s    CFA;r&   )key' c           
   3   p   <"   T F+  w  rV: R \        \        VSV,          4      ^4      : 2x  K-  	  R# 5i)=N)r   r   )r  r  r  axisMappings   &  r#   r  r  h  s;      	 %-DA - 21k!n Er %-s   36z (normalized)z.ufo)	UFOReader.z9Font file does not seem to be variable. Nothing to check.getGlyphSetzRunning on %d glyphsetszLocations: %s)	r   r   r]   r`   r   r^   r_   ra   rb   w)filezGlyph z was not compatible:rn   rq   rr   rm   ro   rp   z  Masters: %s:z, rl   z"    Glyph was missing in master %sz'    Glyph has an open path in master %sz*    Path count differs: %i in %s, %i in %srs   rt   z5    Node count differs in path %i: %i in %s, %i in %sru   z7    Node %o incompatible in path %i: %s in %s, %s in %srv   z    Contour order differs: z in zD    Contour %d start point differs: %s in %s, %s in %s; reversed: %srL   rw   z3    Contour %d interpolation is underweight: %s, %sz2    Contour %d interpolation is overweight: %s, %sz'    Contour %d has a kink at %s: %s, %sr:   z    Showing z and pszWriting %s to %s)InterpolatablePSInterpolatablePDF)rh   r   )r^   r_   zWriting HTML to %s)InterpolatableSVG)show_tolerancer^   r_   )r:  show_page_numberwbs   <!DOCTYPE html>
sN   <html><body align="center" style="font-family: sans-serif; text-color: #222">
s6   <title>fonttools varLib.interpolatable report</title>
z
<h1>Glyph z</h1>
zutf-8z$<img src='data:image/svg+xml;base64,s   ' />
s   <hr>
s   </body></html>
)z.glyphsz.glyphspackager3   )r3          )r6  pdf)argparsesysArgumentParsermain__doc__add_argumentfloatDEFAULT_TOLERANCEr   str
parse_args	fontToolsr  verboser   r   splitos.pathr  setDEFAULT_UPEMtupler   r(   endswithfontTools.designspaceLibr	  fromfilesourcesru   r!  axeshasattrr   r
  defaultmaximummapitems	glyphsLibr  r  upmfontr|   
familyName	styleNamefontTools.ttLibr  
unitsPerEmminValuedefaultValuemaxValueaxisTagr)   tablesegmentscopyr   r   r  sorted
variationsry   r*   r3  r   cfftopDictIndexCharStringsprivater<   programadd
isinstanceintr'  
otVarStoreVarDataVarRegionIndexVarRegionListRegionVarRegionAxis	PeakCoordjoinr   fontTools.ufoLibr1  r   readInforsplitr{   warningr}   r   r^   r_   r   r   ra   r   outputstdoutr   r   quietjsonprintdumpsr~   r   r   r   r   r   r   r   r   r   r   r   sort_problemsupperinterpolatablePlotr7  r8  add_title_pageadd_summaryadd_problemsdraw_cupcake	add_indexadd_table_of_contentshtmlr9  base64writeencode	b64encode	Exceptionr   error)dr   r@  rA  parserr  r   r  fontsr   r]   rb   r`   original_args_inputsdesignspacer	  rm   aaxis_triplesr  vvr  r  gsfontsourcefr  r]  r  axisr"  r  tagre  rg  fvarMappingr!  r:   ttGlyphSetsrh   r   r   r    varlocDictlocvallocTuplefvarAxescff2charstringscsrn  	vsindicesr%  last_oprM   varStorevarDataregionIndexregion	axisIndexr!   r   _filenamer1  r|   accepted_namesgn	glyphsSetglyphSetGlyphNamesdiffr  r^   r_   problems_genr   r  r   last_glyphnameplast_master_idxsmaster_idxsmaster_namesrN   r7  r8  PlotterClassdocr9  svgsglyph_startssvgrJ   glyph_problemsr  rg   rO   r0  r  sd   &                 `                                                                               @@r#   rC  rC  a  s   $$)LL % F 5  
 B  
 ;>OO	   8;LL	   +  
 *  
 1  
 +  
 4  
 B  
 K  
 b   V   k,EUV
	,=UVT"D&$,,,I?zzz7#$(KKKT[[ TF EEIEMD -
4;;1;;q>"">22D-66t{{1~FK5@5H5HI5H6;;5HIDK7B7J7JK7JV7JIK + 0 0 0198M 0  
 %)))A66. :AIIqyy99)  
 5@4D4DE4DqQVVQUU]4DEM *//11EAr 55SPRS55SPRSSS1  L
 [[^$$%BCC8DKKN+F::D(0K/:/B/BC/BVV[[/BECNSTe 1 11663C3CDeETDK7B7J7JK7JV7JIKCNCSCSCSaAIIqyy99CS   5@4D4DE4DqQVVQUU]4DEM *//11EAr 55SPRS55SPRSSS1  L
 [[^$$V,,A0G0G0O0O. $++a.)D<**D<DK		t((t}}-DLL) " J~F|4::z488HS"T3RAq!(<#<"TK!%J-1]]-@-@-B)&1'&:&?&?&A/7~~/?OHe:L (+;K07 0@ .C K#D)I~F|F|>#DOO$8$8$:;F!'I#y99"$ (.sxx~~/?(@HC+.q6GCLJJSV}5 )A $):#;6484D4D)0TPU 5E 5K1 ,%y':K<QSW  : "($ 4<,,F|''44Q7"..>#K$4$4$67F!'I$Y/B jjG "))Q!? @I%gy!<GG (

3=%MM'29_#-gs#;#;;#;&-G"$ 4 #7H55 &~~88H#,"*"2"27";+2+A+AK%-%;%;%B%B;%OF&(G"$C3<V=Q=Q3R	4&.y&9&A&A&*nn/2 #

C: 6	 4S (-SzH'{:8<8H8H-4/316 9I 9"H 5 (1':H2=h2G	2RHY/) ,B $-/ "(^ FE%%'(EI4:;;K;K;M4NO4NqA{N4NLO"9>>#39NOhh 	 %-	 	
   O+DT"Yx01  h0' P* #'DDK!&'AR	'KKV$$2X&D"$DMM$??DLL.(#D<**DLLXh'..sA6q9:!  $ 5zA~OPI4'''')HH(--/B/Q!Xa[./BC  yyyTYY #&eY"7
"7h~% H"7 	 
 #&e"7
"7h~% H"7 	 

 #(B%$4>+A%B	T	HHMMObROR	TUVFI 1--4# 	  
 C		
\2	
 #		B1qM/Atq!tB	
    33"3I"&.."<BSIm*C	N;')"45..]]'
 t$ {{" JJ'4c: 	
 zzzyyy*6&IwY'..w7 +7 djj*3!%$0LIqY'..q1 N2yk1EFQO)2+/( (1, <*/>1BC  
 #&66  (1} x[N"#J-:!? %
 $))L2IIPQR+6(y$9$A$AA@1X;NUV 6&;&E&EEE(S!"  6&;&F&FFH !) !* !) !*	 "#	 	 6&;&F&FFS !&	 !) !* !) !* "#
 
 6&;&P&PPU !&	 !&	 !) !* !) !* "#  6&;&I&II !") !* !) !* "#	 	 6&;&M&MMb !) !) !* !) !* !* "#  6&;&G&GGQ !) !* !* "#  6&;&F&FFP !) !* !* "#  6&;&@&@@E !) !'
 !* !*	 "#	 	 6&;&C&CC !"* !*
 "# w %1H '3"	7#**73 '3 !*A$"C{HH'C8O/0Dy+>OL!#&)5 ""(I #  OOH-  *


$$&MMO--/  0 999HH)4995=DL"49EJJc""(#(''	 #  .6^^-=)E>.3LT+$$/',). %  .>  


$$& K" '		2D99Q,-f RS'oFAsL(*\!_,=W E L LW UVGGBII'RSGGF,,S12GGI&GGI& . +, :93 Z  G JK
 F DTK F2 #U~ P4 (< C



 C U Cz  * KJJ& :9  	&&		!s  0A\ A\%>A\*A\*7A\/2A\/ A\4A\9-A\9:A\?:A]&A]	
7A] A]A]-A]A].A]#6A](A]-
A]2)A]2 A]8A]8	A]>,A]>"A^%A^2A^	A^	
	A^CA_ A_ &P8A_ N$CA_ Q(AA^R0A^SA^S"A^S= A_ T>A_ UAA^+V9A^+WA^+W4A_ XC:A^?\
A_ ^	A^^A^(^!
A_ ^+A^<	^6	A_ ^?A_	_
A_ _A_ _A`_1A``A`__main__)NNFr   )8rD  interpolatableHelpersinterpolatableTestContourOrderr   interpolatableTestStartingPointr   fontTools.pens.recordingPenr   r   r   fontTools.pens.transformPenr   fontTools.pens.statisticsPenr	   r
   fontTools.pens.momentsPenr   fontTools.varLib.modelsr   r   fontTools.misc.fixedToolsr   fontTools.misc.transformr   collectionsr   typesr   	functoolsr   pprintr   mathr   r   r   loggingr   	getLoggerr{   rG  r   r   rO  r   r   r   r   r   rC  rV   rA  r   exitrr  boolrf   r&   r#   <module>r     s!   % > @ 
 5 L 6 I 7 . # !        	9:    U3 U3pG G  G  G 
G G GT x MQ	h zvHHHSh !	 r&   