+
    f7i\M  c                   s   R t ^ RIHtHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
HtHt ^ RIHt ^ RIHtHtHt ^ RIHtHtHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIt ^ RI!t"^ RI#t#^ RI$H%t% ]#PL                  ! R4      t'/ t(. ROt)]*! ]+! ])RR ])R,          4      ^R7       F  w  t,w  t-t.]-].,           ^,          t/],](]/&   K   	  R t0R t1R t2]! R4      RR l4       t3RR lt4]5R8X  dd   ^ RI6t6]7! ]6Pp                  4      ^8  d   ]6Pr                  ! ]4! 4       4       ^ RI:t:]6Pr                  ! ]:Pv                  ! 4       Px                  4       R# R# )a  
Instantiate a variation font.  Run, eg:

.. code-block:: sh

    $ fonttools varLib.mutator ./NotoSansArabic-VF.ttf wght=140 wdth=85

.. warning::
   ``fontTools.varLib.mutator`` is deprecated in favor of :mod:`fontTools.varLib.instancer`
   which provides equivalent full instancing and also supports partial instancing.
   Please migrate CLI usage to ``fonttools varLib.instancer`` and API usage to
   :func:`fontTools.varLib.instancer.instantiateVariableFont`.
)floatToFixedToFloatfloatToFixed)deprecateFunction)otRound)	BoundsPen)TTFontnewTable)	ttProgram)GlyphCoordinatesflagOverlapSimpleOVERLAP_COMPOUND)supportScalarnormalizeLocationpiecewiseLinearMap)MutatorMerger)VarStoreInstancer)MVAR_ENTRIES)	iup_deltaN)BytesIOzfontTools.varlib.mutatori   NN)Zstartc                 sZ   RpRpV P                    EF  pVP                  p\        VR4      '       d   VP                  M^ pVP                  P                  4        F  w  rxWs9   dN   \        V\        4      '       d8   V! WhR,          4      p	\        V^ ,          V	,           4      VP                  V&   KX  Wr9   g   K`  \        V^ ,          \        4      '       g   K   ^ p	\        V4       F6  w  rV	\        V! WkR,          4      4      ,          p	V^ ,          V	,           W&   K8  	  K  	  EK  	  R# )
BlueValuesvsindexr   N)r   Z
OtherBluesZFamilyBluesZFamilyOtherBluesZ	StemSnapHZ	StemSnapV)Z	BlueScaleZ	BlueShiftZBlueFuzzZStdHWZStdVW)
ZFDArrayZPrivatehasattrr   rawDictitemsZ
isinstancelistr   	enumerate)topDictinterpolateFromDeltasZpd_blend_listsZpd_blend_valuesZfontDictZpdr   keyZvaluedeltaiZval_lists   &&          ?/usr/lib64/python3.14/site-packages/fontTools/varLib/mutator.pyinterpolate_cff2_PrivateDictr!   3   s    N OOOO!(Y!7!7"**a****,JC&Jud,C,C-gRyA")%(U*:";

3'Za$-G-GE
 #,U#3KAW%:7RL%QRRE'{U2EH $4 - $    c                 sX   V P                   pV EF  pW4,          p. p^ p^ p\        VP                  4       EF<  w  rV
R8X  dQ   VP                  V	^,
          ,          pV^ 8w  d%   VP                  VP                  W^,
           4       V	^,           pK]  V
R8X  g   Kf  VP	                  V4      p^V,           pVP                  V	^,
          ,          pWV,          ^,           ,
          pW,           ;ppW8  dW   VV,           pVP                  VV pV! VV4      pVP                  V;;,          \        V4      ,          uu&   TpV^,          pK\  VP                  VP                  W 4       V	^,           pEK?  	  V^ 8w  g   EKr  VP                  VP                  VR 4       Wen        EK  	  R# )    r   ZblendN)CharStringsr   programZextendZgetNumRegionsr   )r   r   
glyphOrdercharstringsgname
charstringZnew_programr   Zlast_ir   ZtokenZnum_regionsZ
numMastersZnum_argsZargiZend_argsZtupleiZnext_tideltasr   s   &&&                 r    interpolate_cff2_charstringsr+   P   s   %%K !'
!*"4"45HA	!$,,QU3Q;&&z'9'9&q5'IJQ'!(66w?_
%--a!e4 z1A56$(O36o${2G'//w?F1'6BE&&t,>,$FAID"":#5#5f#FGQ5 66 Q;z11&':;!,K r"   c                s,   VP                   p\        V4      pV R,          pRpRV 9   d>   V R,          P                  pV R,          p\        VP                  VP
                  V4      p	\        V4       EF  w  r\        Wk,          4      pV'       dF   VP                  '       d   VP                  P                  V,          pMT
p\        X	V,          4      pM^ pVP                  4        WK,          pVP                  V4       VP                  f   ^ pM,\        VP                  ^ ,          4      pV^,          V,
          pV'       g   V'       g   K  V'       d   \        ^ V^ ,          V,           4      V^ &   V'       d   XV^&   \        V4      Wk&   EK   	  R# )a6  Unlike TrueType glyphs, neither advance width nor bounding box
info is stored in a CFF2 charstring. The width data exists only in
the hmtx and HVAR tables. Since LSB data cannot be interpolated
reliably from the master LSB values in the hmtx table, we traverse
the charstring to determine the actual bound box.hmtxNHVARfvar)r$   r   tabler   VarStoreaxesr   r   ZAdvWidthMapZmappingr   ZinitZdrawZboundsmaxZtuple)varfontr   r&   locr'   Z	boundsPenr,   Z
hvar_tabler.   varStoreInstancerZgidr(   ZentryZ	width_idxZwidth_deltar)   Z	lsb_deltaZlsbs   &&&&              r    interpolate_cff2_metricsr6   z   sI    %%K*%I6?DJV_**
v-j.A.A499cR
+
T[!%%%&22::5A		!"3I">?KK 	 '
	"#I)**1-.Ca3Iq%(["89aa,DK9 ,r"   zduse fontTools.varLib.instancer.instantiateVariableFont instead for either full or partial instancingc                s  aE V'       g8   \        4       pV P                  V4       VP                  ^ 4       \        V4      p V R,          pVP                   Uu/ uF0  qfP
                  VP                  VP                  VP                  3bK2  	  pp\        W4      pRV 9   dH   V R,          P                  p	VP                  4        U
Uu/ uF  w  rV
\        WV
,          4      bK  	  pp
pVP                  4        U
Uu/ uF  w  rV
\        V^4      bK  	  pp
p\        P                  RV4       RV 9   EdN   \        P                  R4       V R,          pV R,          oEV R,          P                   p\#        V P%                  R4      R	R
4      p\'        VP(                  P+                  4       VE3R lR7      pV F  pVP(                  V,          pSEP-                  VW4      w  ppR
R
ppV F  p\/        VVP                  4      pV'       g   K#  VP0                  pR
V9   d1   Vf   SEP-                  VW4      w  pp\3        VVXP4                  4      pV\7        V4      V,          ,          pK  	  SEP9                  VVW4       K  	  MR
oERV 9   d   V R RV 9   d   \        P                  R4       V R,          pV R,          p/ pVP(                   Fk  p\/        VVP                  4      pV'       g   K#  \;        VP0                  4       F/  w  ppVf   K  VP%                  V^ 4      VV,          ,           VV&   K1  	  Km  	  VP                  4        F$  w  ppVV;;,          \=        V4      ,          uu&   K&  	  RV 9   d   \        P                  R4       V P?                  4       pV R,          p V P@                  PB                  ^ ,          p!\E        V!PF                  PH                  VP                  V4      p"V"PJ                  p#\M        V!V#4       V PO                  4        \Q        V!V#V4       \S        V V!VV4       V!PT                  R V!=#RV 9   d   \        P                  R4       V R,          PV                  p$\E        V$PF                  VP                  V4      p%V$PX                  p&V& F~  p'V'PZ                  p(V(\\        9  d   K  \\        V(,          w  p)p*\=        V%V'P^                  ,          4      pV'       g   KR  \a        V V),          V*\#        V V),          V*4      V,           4       K  	  \        P                  R4       R9 EFk  p)V)V 9   g   K  V V),          PV                  p+\#        V+RR
4      '       g   K5  V+Pb                  pVPd                   EF  p,Rp-V,Pf                  Ph                   F~  p.V.Pj                  ^8X  d_   V.Pl                  p/VP                  V/,          P
                  p0V.Pn                  p1V.Pp                  p2VV0,          pV1Tu;8:  d   V28:  g   M Rp-MRp-V-'       d   K~   M	  V-'       g   K  V,Pr                  Pt                  R8X  g   Q hV,Pr                  Pv                   F9  p'V'Px                  V+Pz                  P|                  V'P~                  ,          n<        K;  	   M	  V+=1EKn  	  RV 9   Ed   V R,          PV                  Pt                  R8  d   \        P                  R4       V R,          PV                  p3\E        V3PF                  VP                  V4      p4\        V V44      p5V5P                  W .RR.4       V3=#RV3n:        V3P                  f
   V3=BRV3n:        V3P                  '       g]   V3P                  '       gK   V3P                  '       g9   V3P                  '       g'   V3Pt                  R8  d   V3P                  '       g   V R Rp6SE'       Ed2   SEP                  P                  4        Fo  p7\        V7R 4      '       g   K  V7P                  P                  4       p8\        ;QJ d    R! V8 4       F  '       g   K   RM	  RM! R! V8 4       4      p6V6'       g   Ko   M	  V'       d   SEP+                  4        F  p9SEV9,          p7V7P                  4       '       d1   V7P                  ^ ,          ;P                  \        ,          unO        KR  V7P                  ^ 8  g   Ke  V7P                  ^ ;;,          \        ,          uu&   K  	  V6'       Ed   \        P                  R"4       . p:R#V 9   d%   V R#,          p;V;P                  P                  4       p:M*\        R#4      p;\        P                  ! 4       V;nJ        V;V R#&   V:P                  R$4       V:P                  R%4       \        \        V4      4      .p<VP                   F7  pV<P                  \        \        WP
                  ,          ^4      4      4       K9  	  V:P                  R&R'P                  V<4      ,           4       V:P                  R(4       V;P                  P                  V:4       R)V 9   dT   V R),          p=\a        V=R*^\#        V=R*^ 4      ,           4       \a        V=R+\        \        V4      \#        V=R+^ 4      4      4       R,V 9   Ed   \        P                  R-4       VP                   Uu0 uF  qfP                  kK  	  p>pVP                   F9  pV>P                  VP                  4       V>P                  VP                  4       K;  	  R.V 9   d   V R,,          P                   U?u. uFH  p?V?P                  V>9   g   K  V?P                  ^ 8X  g   K)  V?P                  R/8w  g   K<  V?P                  NKJ  	  p@p?\        V@4      \        \        \        V R.,          P                  4      4      4      8X  d   V R. V R,,          P                   U?u. uF)  p?V?P                  R08  g   V?P                  V>9  g   K'  V?NK+  	  up?V R,,          P                  R1&   R2V9   d:   R3V 9   d3   \=        \        ^\        VR2,          R44      4      4      V R3,          nj        R5V9   dV   VR5,          pA\'        \        P                  4       4       F  w  pBpCXAVB8  g   K  XCV R3,          nl         M	  ^	V R3,          nl        R6V9   d1   R7V 9   d*   \        R:\        VR6,          ^Z4      4      V R7,          nm        \        P                  R84       R; F  pDVDV 9   g   K  V XD K  	  V # u upi u upp
i u upp
i u upi u up?i u up?i )<a&  Generate a static instance from a variable TTFont and a dictionary
defining the desired location along the variable font's axes.
The location values must be specified as user-space coordinates, e.g.:

.. code-block::

    {'wght': 400, 'wdth': 100}

By default, a new TTFont object is returned. If ``inplace`` is True, the
input varfont is modified and reduced to a static font.

When the overlap parameter is defined as True,
OVERLAP_SIMPLE and OVERLAP_COMPOUND bits are set to 1.  See
https://docs.microsoft.com/en-us/typography/opentype/spec/glyf
r.   avarzNormalized location: %sgvarzMutating glyf/gvar tablesglyfr,   ZvmtxmetricsNc                 s   < SV ,          P                  4       '       d%   SV ,          P                  S4      P                  V 3# ^ V 3# )r#   )isCompositeZgetCompositeMaxpValuesZmaxComponentDepth)namer9   s   &r    Z<lambda>Z)instantiateVariableFont.<locals>.<lambda>   sI     Dz--// J55d;MM  r"   )r   ZDSIGcvarzMutating cvt/cvar tableszcvt CFF2zMutating CFF2 tabler0   MVARzMutating MVAR tablezMutating FeatureVariationsGPOSFeatureVariationsTFi   ZGDEFi  zMutating GDEF/GPOS/GSUB tablesi  r%   c              3   sB   "   T F  qP                  R 4      x  K  	  R# 5i)ZGETVARIATIONN)Z
startswith)Z.0Zops   & r    Z	<genexpr>Z*instantiateVariableFont.<locals>.<genexpr>i  s     SlmmN;;ls   z1Adding IDEF to fpgm table for GETVARIATION opcodefpgmzPUSHB[000] 145zIDEF[ ]z
NPUSHW[ ] Z zENDF[ ]maxpZmaxInstructionDefsZmaxStackElementsr<   zPruning name tableZltagi  i   :NNNZwghtzOS/2i  wdthZslntZpostzRemoving variable tables)ZGSUBr@   i)r7   r=   r.   r8   r-   r?   ZVVARZSTAT)nr   saveZseekr   r1   axisTagZminValueZdefaultValueZmaxValuer   Zsegmentsr   r   r    loginfor:   ZgetattrZgetZsorted
variationsZkeysZ_getCoordinatesAndControlsr   coordinatesr   endPtsr   Z_setCoordinatesr   r   ZgetGlyphOrderZcffZtopDictIndexr   r0   Z
otVarStorer   r!   Zdesubroutinizer+   r6   r   r/   ZValueRecordZValueTagr   ZVarIdxZsetattrrA   ZFeatureVariationRecordZConditionSetZConditionTableZFormatZ	AxisIndexZFilterRangeMinValueZFilterRangeMaxValueZFeatureTableSubstitutionZVersionZSubstitutionRecordZFeatureZFeatureListZFeatureRecordZFeatureIndexr   ZmergeTablesZMarkGlyphSetsDefZLigCaretListZMarkAttachClassDefZGlyphClassDefZ
AttachListZglyphsZvaluesr   r%   ZgetAssemblyZanyr;   Z
componentsZflagsr
   ZnumberOfContoursr	   r   r   ZProgramZappendZstrlenr   ZjoinZfromAssemblyr2   Z
axisNameIDZ	instancesZaddZsubfamilyNameIDZpostscriptNameIDZnamesZnameIDZ
platformIDZlangIDZsetZrangeZtagsZminZusWeightClassOS2_WIDTH_CLASS_VALUESZusWidthClassZitalicAngle)Fr3   ZlocationinplaceoverlapZstreamr.   Zar1   r4   ZmapsZkZvr8   ZhMetricsZvMetricsZ
glyphnamesZ	glyphnamerI   rJ   Z_Z
origCoordsrK   ZvarZscalarr   Zgr=   Zcvtr*   r   Zcr&   r>   r   ZvsInstancerr   Zmvarr5   ZrecordsZrecZmvarTagZtableTagZitemNamer/   ZrecordZappliesZ	conditionZaxisIdxrF   ZMinZMaxZgdefZ	instancerZmergerZaddidefZglyphZinstructionsZ
glyph_nameZasmrB   argsrC   ZexcludeZnZexcludedUnicodeLangIDsrD   ZpercentZ
widthClasstagr9   sF   &&&&                                                                 @r    instantiateVariableFontrR      s
   ( VA.6?DIMSAII

ANNAJJ??DS
H
+Cv''=@YY[I[TQq$QQ00[I58YY[
A[TQ1!!R(([C
AHH&,,-vv6?**7;;v.	4@OO  "


 $I3J!<<8NK "&tJ!&sCHH55=!)(,(G(G%x)
A &eZBE/6?? "   KL% $( FO+,vfo??C"31F!#//21= &

1a 06A: =F1I 3	 # HAuFgen$F ' &'**,
v((''*'(8(8(C(CTYYPST + A A$W.CD$W.CZP ':sCOOJ'&'v$$-dmmTYYL""CllGl*!-g!6Hh-cjj9:E!)84u<  HH)*"7"!''u1488,,
 77FG#00??	##q('11G"ii088G#77C#77CGA1OO"'#Gw @ w66>>*LLL!::MMC %%33C4D4DEM N - 8. #= #@ WV_22::jH12v$$%dmmTYYD	w	27I/?@ M!  (%%DL &&&!!!
*t/D/D/DGt[['')Eui(($}}88:#SlS###SlSS7 * "iik
Z($$&&$$Q'--1AA-++a/KKN&77N * wDEW6?D,,**,CF#D$,,.DL"GFO

#$

9CHAKKLYY<=> 

<#((4.01

9!!#& W6?D*A>RTU0V,V "CHgd,>BC %&)-3A<<3AKK))*KK**+   W !..&.A88w& +,<<1+< ABVAS . # &
 )*c%WV_=Q=Q8S2T.UUFO V_**$
*xx#~!8 A*$
a  f/(/As8F;KT7R0S(T%#)*@*F*F*H#IGZg~/9, $J
 ,-GFO(f/&)#s8F3CR/H&I#HH'(O'> P Nq T J
AV 4&$
s<   6t4t9<t?uu
#u
6u
	u
/$uuc                s   ^ RI Hp ^ RIpVP                  RRR7      pVP	                  RRRR	7       VP	                  R
RRRR7       VP	                  RRRRRR7       VP	                  RRRRR7       VP                  RR7      p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                  V 4      pVP                  pVP                  '       g.   \        P                  P                  V4      ^ ,          R&,           MVP                  pT! VP                  '       d   R'MVP                  '       d   R(MR)R*7       / pVP                   FE  p	 V	P                  R+4      w  r\!        V
4      ^8:  g   Q h\#        V4      WP%                  ^4      &   KG  	  \,        P/                  R-V4       \,        P/                  R.4       \1        WeP2                  R/7      p\5        WR0VP6                  R17       \,        P/                  R2V4       VP9                  V4       R#   \&        \(        3 d    TP+                  R,T	,          4        K  i ; i)3zInstantiate a variation font)configLoggerNzfonttools varLib.mutatorzInstantiate a variable font)Zdescriptioninputz	INPUT.ttfzInput variable TTF file.)metavarhelplocargszAXIS=LOCZ*zList of space separated locations. A location consist in the name of a variation axis, followed by '=' and a number. E.g.:  wght=700 wdth=80. The default is the location of the base master.)rU   ZnargsrV   z-oz--outputz
OUTPUT.ttfz7Output instance TTF file (default: INPUT-instance.ttf).)rU   ZdefaultrV   z--no-recalc-timestamprecalc_timestampZstore_falsez:Don't set the output font's timestamp to the current time.)ZdestactionrV   F)Zrequiredz-vz	--verboseZ
store_truezRun more verbosely.)rY   rV   z-qz--quietzTurn verbosity off.z--no-overlaprO   z5Don't set OVERLAP_SIMPLE/OVERLAP_COMPOUND glyf flags.z-instance.ttfZDEBUGZERRORZINFO)ZlevelZ=z$invalid location argument format: %rzLocation: %szLoading variable font)ZrecalcTimestampT)rN   rO   zSaving instance font %s)	fontToolsrS   argparseZArgumentParserZadd_argumentZadd_mutually_exclusive_groupZ
parse_argsrT   ZoutputosZpathZsplitextZverboseZquietrW   ZsplitrL   ZfloatZljustZ
ValueErrorZAssertionErrorZerrorrG   rH   r   rX   rR   rO   rE   )rP   rS   r[   ZparserZlogging_groupZoptionsZvarfilenameZoutfiler4   ZargrQ   Zvalr3   s   &            r    mainr]     sU   &$$"0M % F ;UV
M	   F   I	   777GMk,5J   i3H   D	   %G--K ~~~ 	%a(?:^^ 
 !///w'---wV C	Gyy~HCs8q= = %c
C		!	  HH^S!HH$%[2J2JKGG$PHH&0LL N+ 	GLL?#EF	Gs   .AH55)I"!I"Z__main__)	g      I@g     @O@g     R@g     U@g      Y@g      \@g     @_@g     b@g      i@i)FT)N)=Z__doc__ZfontTools.misc.fixedToolsr    r   ZfontTools.misc.loggingToolsr   ZfontTools.misc.roundToolsr   ZfontTools.pens.boundsPenr   ZfontTools.ttLibr   r   ZfontTools.ttLib.tablesr   ZfontTools.ttLib.tables._g_l_y_fr   r	   r
   ZfontTools.varLib.modelsr   r   r   ZfontTools.varLib.mergerr   ZfontTools.varLib.varStorer   ZfontTools.varLib.mvarr   ZfontTools.varLib.iupr   ZfontTools.subset.cffrZ   Zos.pathr\   ZloggingZior   Z	getLoggerrG   rM   Zpercentsr   Zzipr   ZprevZcurrZhalfr!   r+   r6   rR   r]   Z__name__ZsysrL   ZargvZexitZdoctestZtestmodZfailed) r"   r    <module>r^      s6   H 9 - . , , 
 
 2 7 . *     23  F Xcr]HRL!AKOA|d4K1D#$4  L
3:'-T,'^ ,P	PfGT z
388}qHHW__%%& r"   