+
    i'K                    f   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHtHtH	t	H
t
HtHtHt ^ RIHtHtHtHtHtHtHtHtHt ^ RIHtHt ^ RIHtHtHtHtH t H!t!H"t" ]PF                  ! ]$4      t%]]]].]&3,          t'R R lt(R	R	](3R
 R llt)RR](3R R llt*R R lt+R R lt,R R lt-R R lt.R R lt/R# )zAllows building all the variable fonts of a DesignSpace version 5 by
splitting the document into interpolable sub-space, then into each VF.
)annotationsN)AnyCallableDictIteratorListTuplecast)	AxisDescriptorAxisMappingDescriptorDesignSpaceDocumentDiscreteAxisDescriptorInstanceDescriptorRuleDescriptorSimpleLocationDictSourceDescriptorVariableFontDescriptor)	StatNamesgetStatNames)ConditionSetRangeRegiongetVFUserRegionlocationInRegionregionInRegionuserRegionToDesignRegionc               (    V ^8  d   QhRRRRRRRR/# )	   docr   instancer   	statNamesr   returnstr )formats   "~/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/fontTools/designspaceLib/split.py__annotate__r&   )   s,     
+ 
+	
+(:
+GP
+
+    c                    VP                   ;'       g    VP                  P                  R4      pVP                  ;'       g    VP                  P                  R4      pV RV R2# )zDefault callable to synthesize an instance filename
when makeNames=True, for instances that don't specify an instance name
in the designspace. This part of the name generation can be overriden
because it's not specified by the STAT table.
en-z.ttf)
familyNamefamilyNamesget	styleName
styleNames)r   r   r    r+   r.   s   &&&  r%   defaultMakeInstanceFilenamer0   )   s_     $$GG	(=(=(A(A$(GJ""DDi&:&:&>&>t&DI\9+T**r'   Tc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   r   r   	makeNamesboolexpandLocationsmakeInstanceFilenameMakeInstanceFilenameCallabler!   z8Iterator[Tuple[SimpleLocationDict, DesignSpaceDocument]]r#   )r$   s   "r%   r&   r&   6   sA     @+ @+	@+@+ @+ 7	@+
 >@+r'   c           
   #  <  "   . p/ pV P                    F  p\        VR4      '       d$   \        \        V4      pVP	                  V4       K8  \        \
        V4      p\        VP                  VP                  VP                  4      WVP                  &   K  	  \        P                  ! V Uu. uF  qfP                  NK  	  up!  pV FF  p\        WH4       U	U
u/ uF  w  rV	P                  V
bK  	  pp	p
\        V / VCVCRVVVR7      pW3x  KH  	  R# u upi u up
p	i 5i)a  Split the given DS5 into several interpolable sub-designspaces.
There are as many interpolable sub-spaces as there are combinations of
discrete axis values.

E.g. with axes:
    - italic (discrete) Upright or Italic
    - style (discrete) Sans or Serif
    - weight (continuous) 100 to 900

There are 4 sub-spaces in which the Weight axis should interpolate:
(Upright, Sans), (Upright, Serif), (Italic, Sans) and (Italic, Serif).

The sub-designspaces still include the full axis definitions and STAT data,
but the rules, sources, variable fonts, instances are trimmed down to only
keep what falls within the interpolable sub-space.

Args:
  - ``makeNames``: Whether to compute the instance family and style
    names using the STAT data.
  - ``expandLocations``: Whether to turn all locations into "full"
    locations, including implicit default axis values where missing.
  - ``makeInstanceFilename``: Callable to synthesize an instance filename
    when makeNames=True, for instances that don't specify an instance name
    in the designspace. This part of the name generation can be overridden
    because it's not specified by the STAT table.

.. versionadded:: 5.0
valuesTkeepVFsr2   r4   r5   N)axeshasattrr	   r   appendr
   r   minimummaximumdefaultname	itertoolsproductr8   zip_extractSubSpace)r   r2   r4   r5   discreteAxesinterpolableUserRegionaxisvalueCombinationsr8   discreteAxisvaluediscreteUserLocationsubDocs   &&&&         r%   splitInterpolablerN   6   s!    D L%'4"" .5D%-D051"99-  "))L+QLDKKL+QR# (+<'@ 
'@# u$'@ 	  
 ">%>)=>+!5
 #** $ ,R 
s   B(D*D>DD..DFc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   r   r   r2   r3   r4   r5   r6   r!   z)Iterator[Tuple[str, DesignSpaceDocument]]r#   )r$   s   "r%   r&   r&   y   s:     " "	"" " 7	"
 /"r'   c           
   #     "   V P                  4        FN  p\        W4      p\        V VRVVVR7      p/ VP                  CVP                  CVn        VP                  V3x  KP  	  R# 5i)a  Convert each variable font listed in this document into a standalone
designspace. This can be used to compile all the variable fonts from a
format 5 designspace using tools that can only deal with 1 VF at a time.

Args:
  - ``makeNames``: Whether to compute the instance family and style
    names using the STAT data.
  - ``expandLocations``: Whether to turn all locations into "full"
    locations, including implicit default axis values where missing.
  - ``makeInstanceFilename``: Callable to synthesize an instance filename
    when makeNames=True, for instances that don't specify an instance name
    in the designspace. This part of the name generation can be overridden
    because it's not specified by the STAT table.

.. versionadded:: 5.0
Fr9   N)getVariableFontsr   rE   librA   )r   r2   r4   r5   vfvfUserRegionvfDocs   &&&&   r%   splitVariableFontsrV   y   si     . ""$&s/ +!5
 ,uyy+BFF+	ggun %s   A%A'c                    V ^8  d   QhRRRR/# )r   r   r   r!   zDict[str, DesignSpaceDocument]r#   )r$   s   "r%   r&   r&      s      	#r'   c                p    / p\        V 4       F$  w  r#\        V4       F  w  rERVn        WQV&   K  	  K&  	  V# )zConvert each variable font listed in this document into a standalone
format 4 designspace. This can be used to compile all the variable fonts
from a format 5 designspace using tools that only know about format 4.

.. versionadded:: 5.0
z4.1)rN   rV   formatVersion)r   vfs	_locationrM   vfNamerU   s   &     r%   convert5to4r]      sB     C.s3	/7MF"'EK 8 4 Jr'   c               4    V ^8  d   QhRRRRRRRRRRR	R
RR/# )r   r   r   
userRegionr   r:   r3   r2   r4   r5   r6   r!   r#   )r$   s   "r%   r&   r&      sW     U U	UU 	U
 U U 7U Ur'   c                 a aa \        4       pV V3R  lpS P                   EF@  pWP                  ,          p	\        V	\        4      '       g   K.  \        VR4      '       g   KB  \        \        V4      pTP                  \        VP                  VP                  VP                  VP                  \        V	P                  VP                  4      V	P                  ;'       g    VP                  \        V	P                   VP                   4      VP"                   U
Uu. uF1  w  rV	P                  T
u;8:  d   V	P                   8:  g   K*  M K.  W3NK3  	  upp
RRR7
      4       EKC  	  . ;Vn        pVP                   Uu0 uF  qP                  kK  	  upoS P$                   EFY  p\&        ;QJ d7    V3R lVP(                  P+                  4        4       F  '       d   K   RM,	  RM(! V3R lVP(                  P+                  4        4       4      '       g   Kv  \&        ;QJ d7    V3R lVP,                  P+                  4        4       F  '       d   K   RM,	  RM(! V3R lVP,                  P+                  4        4       4      '       g/   \.        P1                  RVP(                  VP,                  4       EK  \3        4       pVP5                  VP(                  P+                  4       4       VP5                  VP,                  P+                  4       4       S P                   F  pVP                  V9  d   K  WP                  ,          p	V	P                  VP                  8w  gG   V	P                  e   V	P                  VP                  8w  g   V	P                   VP                   8w  g   K  \.        P1                  R	VP                  4       K  	  VP7                  \9        VP(                  VP,                  R
7      4       EK\  	  \;        S V4      p\=        S P>                  V4      Vn        S P@                  Vn         S PB                   F  p\E        S PG                  VPH                  4      V4      '       g   K0  VPK                  \M        VPN                  VPP                  VPR                  VP                  \U        W! V4      4      VPV                  VPX                  VPZ                  VP\                  VP^                  VP`                  R7      4       K  	  VPc                  4       pS Pc                  4       pVe   Ve   VPd                  Vn2        V'       d   S Pg                  4        F  p\i        S V4      p\k        VV4      '       g   K#  TPm                  \o        VP                  VPN                  VPp                   Uu. uF.  p\        VVP                  ,          \        4      '       g   K,  VNK0  	  upVPr                  R7      4       K  	  S Pt                   EF8  p\E        VPw                  S 4      V4      '       g   K'  V'       Ed   \y        S VPw                  S 4      4      pVPX                  ;'       g    VPz                  P}                  R4      pVPZ                  ;'       g    VP~                  P}                  R4      pTP                  \        R/ RVPN                  ;'       g    V! S VV4      bRVPP                  bRVPR                  bRVP                  ;'       g    V RV 2bRS'       d   / MVP                  bR\U        W! V4      4      bRVbRVbRVP                  ;'       g    VP                  bRVP                  ;'       g    VP                  P}                  R4      bRVP                  ;'       g    VP                  bRVPd                  ;'       g    VPz                  bRVP                  ;'       g    VP~                  bRVP                  ;'       g    VP                  bRVP                  ;'       g    / bRVPr                  b 4       EKA  TP                  \        R/ RVPN                  bRVPP                  bRVPR                  bRVP                  bRS'       d   / MVP                  bR\U        W! V4      4      bRVPX                  bRVPZ                  bRVP                  bRVP                  bRVP                  bRVPd                  bRVP                  bRVP                  bRVP                  bRVPr                  b 4       EK;  	  S Pr                  Vn9        V# u upp
i u upi u upi ) c                N   < S'       d   V P                  S4      # V P                  # N)getFullDesignLocationdesignLocation)objectr   r4   s   &r%   maybeExpandDesignLocation3_extractSubSpace.<locals>.maybeExpandDesignLocation   s#    //44(((r'   r>   N)
tagrA   
labelNameshiddenr>   r@   r?   mapaxisOrdering
axisLabelsc              3  ,   <"   T F	  qS9   x  K  	  R # 5irb   r#   .0rH   
subDocAxess   & r%   	<genexpr>#_extractSubSpace.<locals>.<genexpr>   s     O2N$:%2N   FTc              3  ,   <"   T F	  qS9   x  K  	  R # 5irb   r#   ro   s   & r%   rr   rs      s     P2O$:%2Ort   zPIn axis mapping from input %s, some output axes are not in the variable-font: %szALimiting axis ranges used in <mapping> elements not supported: %s)inputLocationoutputLocation)filenamepathfontrA   rd   	layerNamer+   r.   muteKerningmuteInfomutedGlyphNames)rA   rx   axisSubsetsrR   r)   rx   ry   rz   rA    userLocationrd   r+   r.   postScriptFontNamestyleMapFamilyNamestyleMapStyleNamelocalisedFamilyNamelocalisedStyleNamelocalisedStyleMapFamilyNamelocalisedStyleMapStyleNamerR   r#   )Jr   r;   rA   
isinstancer   r<   r	   r
   addAxisrh   ri   rj   maxr>   r@   minr?   rk   axisMappingsallrv   keysrw   LOGGERerrorsetupdater=   r   r   _subsetRulesBasedOnConditionsrulesrulesProcessingLastsourcesr   map_backwardrd   	addSourcer   rx   ry   rz   _filterLocationr{   r+   r.   r|   r}   r~   findDefaultr   rQ   r   r   addVariableFontr   r   rR   	instancesgetFullUserLocationr   r,   r-   r/   addInstancer   r   r   r   styleMapFamilyNamesr   r   r   r   )r   r_   r:   r2   r4   r5   rM   rf   rH   rangeuserdesignmappingsmappingmappingAxesdesignRegionsource	vfDefault
oldDefaultrS   rT   
axisSubsetr   r    r+   r.   rq   s   f&$$d$                    @r%   rE   rE      s    !"F) 99%eU##i(@(@ -DNN#;;t||<!MM99T\\t||< -1HH,4LD ==DAEMMA 'A ',4 "&## : &('F((.4))4J##sO'2G2G2L2L2NOsssO'2G2G2L2L2NOOOsP'2H2H2M2M2OPsssP'2H2H2M2M2OPPPLLb%%&&
 e70055787116689HHDyy+yy)E-MM-%--4<<2O==DLL0WII   	!%33&55	
; $P ,C<L0LIFL!$!8!8F ++ 0 01F1F GTT[[[[[[. 9& A  !**!,, **".. & 6 6	
	 . ""$I"J!7(2(F(F	% &&(B*33LlJ77&&*WW!# /1nn%.<
)*Z__*EuM 'J.<%
 FF	 )" MM < <S A:NN9$S(*F*Fs*KLI!,,OO	0E0E0I0I$0OJ **LLi.B.B.F.Ft.LI" %.. F F+C9E " "	
 "EEZL)*E (7H<Q<Q $3"$=h$G$  * ( (0'B'B (4 (4 33 (0'B'B (? (? 4488>  '/&@&@ '3 '3 22#$ )1(D(D )- )- ,,'( (0'B'B (, (, +++, 190T0T 15 15 44/0 08/R/R 0 034 !5> " %..! " "	
 (7H<Q<Q $3"$=h$G$  (22 '00 (0'B'B (0'B'B '/&@&@ )1(D(D (0'B'B  190T0T!" 08/R/R#$ !%O "| FJMU 5h%s$   'e!e!e!=e'6)e,$e,c                    V ^8  d   QhRRRR/# )r   conditionSetzList[Dict[str, Any]]r!   r   r#   )r$   s   "r%   r&   r&     s      $8 \ r'   c                    / pV  Fb  pVP                  R 4      VP                  R4      rC\        Ve   TM\        P                  ) Ve   TM\        P                  4      WR,          &   Kd  	  V# )r>   r?   rA   )r-   r   mathinf)r   c	conditionr>   r?   s   &    r%   _conditionSetFromr     sa    A!	$==3Y]]95M$*G	*G 
F
 " Hr'   c               $    V ^8  d   QhRRRRRR/# )r   r   zList[RuleDescriptor]r   r   r!   r#   )r$   s   "r%   r&   r&     s$     > >>/5>>r'   c                   . pV  EF<  p\        VP                  . VP                  R 7      pVP                   F  p\	        V4      p. pRpVP                  4        F  w  rW9  d   K  \        V
\        \        34      '       d   WV	,          9   d   K8  RpK<  WV	,          9   d   KK  Wi,          P                  V
4      pVe.   VP                  RV	RVP                  RVP                  /4       K  RpK  	  V'       d   K  VP                  P                  V4       K  	  VP                  '       g   EK+  VP                  V4       EK?  	  V# ))rA   conditionSetssubsFTrA   r>   r?   )r   rA   r   r   r   itemsr   floatintintersectionr=   r>   r?   )r   r   newRulesrulenewRuleconditionsetcsnewConditionsetdiscardConditionsetselectionNameselectionValuer   s   &&          r%   r   r     s:   $ &(H"0"499#
 !..L"<0B46O"'1=1C1C1E- *nucl;;%M):: /3+ &M)::')'8'E'En'U'3+22$*M$-|/C/C$-|/C/C!" 37/; 2F< '&%%,,_=G /H    OOG$S V Or'   c               $    V ^8  d   QhRRRRRR/# )r   r_   r   locationzDict[str, float]r!   r#   )r$   s   "r%   r&   r&     s&       r'   c                    VP                  4        UUu/ uF-  w  r#W 9   g   K  \        W,          \        4      '       g   K+  W#bK/  	  upp# u uppi rb   )r   r   r   )r_   r   rA   rK   s   &&  r%   r   r     sN     $>>++KD 	",Z-=u"E 	+  s   
AAA)0__doc__
__future__r   rB   loggingr   typingr   r   r   r   r   r   r	   fontTools.designspaceLibr
   r   r   r   r   r   r   r   r   "fontTools.designspaceLib.statNamesr   r   fontTools.designspaceLib.typesr   r   r   r   r   r   r   	getLogger__name__r   r"   r6   r0   rN   rV   r]   rE   r   r   r   r#   r'   r%   <module>r      s    #    C C C
 
 
 G   
		8	$',i8#=  

+  9T	@+J !9T	"J"Up>Br'   