
    h                        S SK r  " S S\5      r " S S\5      r " S S\5      r " S S	\5      r " S
 S\5      r " S S\5      r " S S\5      r " S S\5      r	 " S S\5      r
 " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S  S!\5      r " S" S#\5      r " S$ S%\5      rg)&    Nc                       \ rS rSrSrSrg)VarLibError   z%Base exception for the varLib module. N__name__
__module____qualname____firstlineno____doc____static_attributes__r       I/var/www/html/env/lib/python3.13/site-packages/fontTools/varLib/errors.pyr   r      s    /r   r   c                       \ rS rSrSrSrg)VarLibValidationError   z>Raised when input data is invalid from varLib's point of view.r   Nr   r   r   r   r   r      s    Hr   r   c                   ^    \ rS rSrSrSS jr\S 5       rS r\S 5       r	\S 5       r
S	 rS
rg)VarLibMergeError   z=Raised when input data cannot be merged into a variable font.Nc                 d    Xl         U(       d  0 nSU;   a  US   U l        US	 O/ U l        X l        g )Nstack)mergerr   cause)selfr   kwargss      r   __init__VarLibMergeError.__init__   s5    FfDJwDJ
r   c                     U R                   $ N)r   )r   s    r   reasonVarLibMergeError.reason   s    ||r   c                 z   U R                   b  U R                   R                  U   nSU;   a+  US   R                  5       (       a  US   R                  5       $ [        UR                  S5      (       aE  [        UR                  R
                  S5      (       a   UR                  R
                  R                  $ SU 3$ )Nnamefilezmaster number )r   ttfsgetBestFullNamehasattrreaderr$   r#   )r   ixttfs      r   _master_nameVarLibMergeError._master_name   s    ;;"++""2&C}V!<!<!>!>6{2244V,,&1Q1Qzz+++t$$r   c                 <   SU R                   ;   a  SU R                   ;   aw  U R                   S    Vs/ s H  oU R                   S   :H  PM     snR                  S5      nU R                  U5      nSU R                   ;   a  U SU R                   S    S3nX#4$ gs  snf )NexpectedgotFlocation ())NNr   indexr+   )r   xr4   master_names       r   offenderVarLibMergeError.offender'   s    #(;:>**U:KL:KQ$**Z00:KLRRE ++E2KTZZ'!,R

:0F/GqI%% Ms   Bc                     SU R                   ;   aX  SU R                   ;   aH  U R                  u  pU R                   S   U   nSU R                  S    SU R                   S   < SU< S3$ g)	Nr.   r/   zExpected to see r   ==z, instead saw 
 )r   r7   r   )r   offender_indexr7   r/   s       r   detailsVarLibMergeError.details3   sl    #(;'+}}$N**U#N3C%djjm_Btzz*7M6PP^_b^eeghhr   c                     U R                   u  pSnU(       a  SU S3nSR                  [        U R                  5      5      n[        R
                  " SU R                   SU 3SS9nSU-   U-   U R                  -   $ )	Nr<   z!

The problem is likely to be in z:
z"Couldn't merge the fonts, because z:. This happened while performing the following operation: N   )widthz

)r7   joinreversedr   textwrapfillr    r>   )r   r=   r7   r0   contextbasics         r   __str__VarLibMergeError.__str__;   s    #'== <XJcJH''(4::./0 >GGNiQ

 ~(4<<77r   )r   r   r   r   )r   r	   r
   r   r   r   propertyr    r+   r7   r>   rI   r   r   r   r   r   r      sP    G	  % 	 	  8r   r   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )ShouldBeConstantI   z9some values were different, but should have been the samec                   >^  [         T	T ]  nT R                  S   S:w  d  T R                  c  U$ T R                  S   S:X  d   eT R                  u  p#T R                  R
                  U   n[        U 4S jT R                  R
                   5       5      nUT R                  S      R                  R                  R                   Vs/ s H  nUR                  PM     nnUT R                  S      R                  R                  R                   Vs/ s H  nUR                  PM     nnUSSR                  U5       SSR                  U5       S3-   $ s  snf s  snf )	Nr   z.FeatureCountc              3      >#    U  H_  nTR                   S    U;   d  M  UTR                   S       R                  R                  R                  TR                  S   :X  d  M[  Uv   Ma     g7f)r.   N)r   tableFeatureListFeatureCountr   ).0r*   r   s     r   	<genexpr>+ShouldBeConstant.details.<locals>.<genexpr>V   sd      
'zz"~$  DJJrN#))55BBzz*%& C's   A*?A*!	A*rQ   z2
Incompatible features between masters.
Expected: z, z.
Got: z.
)superr>   r   r   r7   r%   nextrR   rS   FeatureRecord
FeatureTagrC   )
r   basic_messager=   _bad_ttfgood_ttfr5   good_featuresbad_features	__class__s
   `        r   r>   ShouldBeConstant.detailsL   sT   ::a=O+t{{/B  zz!}/// MM++"">2 
{{''
 
 djjn-33??MM
M LLM 	 
 TZZ^,22>>LL
L LLL 	 
 =12 3IIl+,C1
 	


s   EEr   )	r   r	   r
   r   r   rK   r>   r   __classcell__rb   s   @r   rM   rM   I   s    C
 
r   rM   c                   8    \ rS rSrSr\S 5       r\S 5       rSrg)
FoundANonem   zAone of the values in a list was empty when it shouldn't have beenc                     U R                   S    Vs/ s H  oS L PM     snR                  S5      nX R                  U5      4$ s  snf Nr/   Tr3   r   r5   r4   s      r   r7   FoundANone.offenderp   sG    $(JJu$56$5qd$56<<TB''... 7   Ac                 L    U R                   U R                  p!US    SUS    S3$ Nr   r:   r/   r;   r   r   r   r   r   s      r   r>   FoundANone.detailsu   ,    zz4::u(2eEl^2..r   r   N	r   r	   r
   r   r   rK   r7   r>   r   r   r   r   rg   rg   m   s+    K/ / / /r   rg   c                   8    \ rS rSrSr\S 5       r\S 5       rSrg)NotANone{   zBone of the values in a list was not empty when it should have beenc                     U R                   S    Vs/ s H  oS LPM     snR                  S5      nX R                  U5      4$ s  snf rj   r3   rk   s      r   r7   NotANone.offender~   sG    (,

5(9:(91$(9:@@F''... ;rm   c                 L    U R                   U R                  p!US    SUS    S3$ ro   rp   rq   s      r   r>   NotANone.details   rs   r   r   Nrt   r   r   r   rv   rv   {   s+    L/ / / /r   rv   c                       \ rS rSrSrSrg)MismatchedTypes   zdata had inconsistent typesr   Nr   r   r   r   r}   r}      s    %r   r}   c                       \ rS rSrSrSrg)LengthsDiffer   z*a list of objects had inconsistent lengthsr   Nr   r   r   r   r   r      s    4r   r   c                       \ rS rSrSrSrg)
KeysDiffer   z$a list of objects had different keysr   Nr   r   r   r   r   r      s    .r   r   c                       \ rS rSrSrSrg)InconsistentGlyphOrder   z0the glyph order was inconsistent between mastersr   Nr   r   r   r   r   r      s    :r   r   c                       \ rS rSrSrSrg)InconsistentExtensions   z6the masters use extension lookups in inconsistent waysr   Nr   r   r   r   r   r      s    @r   r   c                   @   ^  \ rS rSrSrSU 4S jjr\S 5       rSrU =r	$ )UnsupportedFormat   z6an OpenType subtable (%s) had a format I didn't expectc                 \   > [         TU ]  " U40 UD6  U R                  (       d	  S/U l        g g )Nz.Format)rX   r   r   )r   r   r   rb   s      r   r   UnsupportedFormat.__init__   s*    *6*zz#DJ r   c                     U R                   U R                  S   -  nSU R                  ;   a  USU R                  S   < S3-  nU$ )Nsubtablevaluer1   r2   )r   r   )r   ss     r   r    UnsupportedFormat.reason   sG    LL4::j11djj 2djj),A..Ar   )r   r   )
r   r	   r
   r   r   r   rK   r    r   rd   re   s   @r   r   r      s    @%
  r   r   c                       \ rS rSrSrSrg)InconsistentFormats   zBan OpenType subtable (%s) had inconsistent formats between mastersr   Nr   r   r   r   r   r      s    Lr   r   c                       \ rS rSrSrg)VarLibCFFMergeError   r   N)r   r	   r
   r   r   r   r   r   r   r      s    r   r   c                       \ rS rSrSrS rSrg)VarLibCFFDictMergeError   z/Raised when a CFF PrivateDict cannot be merged.c                 H    SU SU S3nU H  nUSU 3-  nM     U4U l         g )NzFor the Private Dict key 'z!', the default font value list:
	z5
had a different number of values than a region font:z
	args)r   keyr   values	error_msgregion_values         r   r    VarLibCFFDictMergeError.__init__   sG    ( .'OQ 	 #L4~..I #L	r   r   Nr   r	   r
   r   r   r   r   r   r   r   r   r      s
    9!r   r   c                       \ rS rSrSrS rSrg)VarLibCFFPointTypeMergeError   zKRaised when a CFF glyph cannot be merged because of point type differences.c                 8    SU SU SU SU SU S3nU4U l         g )NGlyph '': 'z' at point index  in master index z+ differs from the default font point type ''r   )r   
point_typept_indexm_indexdefault_type
glyph_namer   s          r   r   %VarLibCFFPointTypeMergeError.__init__   sB    j\j\1B8* M#9 %~Q  	
 L	r   r   Nr   r   r   r   r   r      s
    U!r   r   c                       \ rS rSrSrS rSrg)VarLibCFFHintTypeMergeError   zJRaised when a CFF glyph cannot be merged because of hint type differences.c                 8    SU SU SU SU SU S3nU4U l         g )Nr   r   z' at index r   z* differs from the default font hint type 'r   r   )r   	hint_type	cmd_indexr   r   r   r   s          r   r   $VarLibCFFHintTypeMergeError.__init__   sA    j\i[I; G#9 %~Q  	
 L	r   r   Nr   r   r   r   r   r      s
    T!r   r   c                       \ rS rSrSrSrg)VariationModelError   z(Raised when a variation model is faulty.r   Nr   r   r   r   r   r      s    2r   r   )rE   	Exceptionr   r   r   rM   rg   rv   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>r      s    0) 0IK I:8{ :8z!
' !
H/! // /&& &5$ 5/! /;- ;A- A(  M+ M	+ 	
!1 
!	!#6 	!	!"5 	!3+ 3r   