+
    f7i  c                   s   ^ 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t]P                   ! ]4      tR t ! R R	]P                  4      t ! R
 R]4      t ! R R]4      tRt ! R R]4      t ! R R]4      tRtR t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t  ! R R]4      t!R t"R  t# ! R! R"]4      t$ ! R# R$]4      t%^ ]^]^]^]^] ^]!^]$/t&R# )%    )	bytesjoinsafeEvalreadHex)getEncoding)getSearchRange)Unicode)DefaultTableNc                 s    \        V4      \        V4      8X  g   Q hV P                  V4      p/ p\        WV4       F  w  rVpV^ 8X  d   K  WtV&   K  	  V# )r    )lenZgetGlyphNameManyzip)ZfontZcharsgidsZ
glyphNamescmapZchargidname   &&&     F/usr/lib64/python3.14/site-packages/fontTools/ttLib/tables/_c_m_a_p.py	_make_mapr      sZ    u:T"""&&t,JDuJ74!8T
 8 K    c                   sb   a  ] tR t^t o RtR tRR ltR tR tR t	RR lt
R tR	 tR
 tRtV tR# )table__c_m_a_pas  Character to Glyph Index Mapping Table

This class represents the `cmap <https://docs.microsoft.com/en-us/typography/opentype/spec/cmap>`_
table, which maps between input characters (in Unicode or other system encodings)
and glyphs within the font. The ``cmap`` table contains one or more subtables
which determine the mapping of of characters to glyphs across different platforms
and encoding systems.

``table__c_m_a_p`` objects expose an accessor ``.tables`` which provides access
to the subtables, although it is normally easier to retrieve individual subtables
through the utility methods described below. To add new subtables to a font,
first determine the subtable format (if in doubt use format 4 for glyphs within
the BMP, format 12 for glyphs outside the BMP, and format 14 for Unicode Variation
Sequences) construct subtable objects with ``CmapSubtable.newSubtable(format)``,
and append them to the ``.tables`` list.

Within a subtable, the mapping of characters to glyphs is provided by the ``.cmap``
attribute.

Example::

        cmap4_0_3 = CmapSubtable.newSubtable(4)
        cmap4_0_3.platformID = 0
        cmap4_0_3.platEncID = 3
        cmap4_0_3.language = 0
        cmap4_0_3.cmap = { 0xC1: "Aacute" }

        cmap = newTable("cmap")
        cmap.tableVersion = 0
        cmap.tables = [cmap4_0_3]

See also https://learn.microsoft.com/en-us/typography/opentype/spec/cmap
c                s|    V P                    F+  pVP                  V8X  g   K  VP                  V8X  g   K)  Vu # 	  R# )a  Returns the first subtable which matches the given platform and encoding.

Args:
        platformID (int): The platform ID. Use 0 for Unicode, 1 for Macintosh
                (deprecated for new fonts), 2 for ISO (deprecated) and 3 for Windows.
        encodingID (int): Encoding ID. Interpretation depends on the platform ID.
                See the OpenType specification for details.

Returns:
        An object which is a subclass of :py:class:`CmapSubtable` if a matching
        subtable is found within the font, or ``None`` otherwise.
N)tables
platformID	platEncID)selfr   r   subtable   &&& r   getcmapZtable__c_m_a_p.getcmap=   s7     H""j0X5G5G95T $ r   c                sb    V F(  w  r#V P                  W#4      pVf   K  VP                  u # 	  R# )a  Returns the 'best' Unicode cmap dictionary available in the font
or ``None``, if no Unicode cmap subtable is available.

By default it will search for the following (platformID, platEncID)
pairs in order::

                (3, 10), # Windows Unicode full repertoire
                (0, 6),  # Unicode full repertoire (format 13 subtable)
                (0, 4),  # Unicode 2.0 full repertoire
                (3, 1),  # Windows Unicode BMP
                (0, 3),  # Unicode 2.0 BMP
                (0, 2),  # Unicode ISO/IEC 10646
                (0, 1),  # Unicode 1.1
                (0, 0)   # Unicode 1.0

This particular order matches what HarfBuzz uses to choose what
subtable to use by default. This order prefers the largest-repertoire
subtable, and among those, prefers the Windows-platform over the
Unicode-platform as the former has wider support.

This order can be customized via the ``cmapPreferences`` argument.
N)r   r   )r   ZcmapPreferencesr   r   ZcmapSubtables   &&   r   getBestCmapZtable__c_m_a_p.getBestCmapP   s7    F &5!J<<
>L'#((( &5 r   c                s    / pV P                    Fg  pVP                  4       '       g   K  VP                  P                  4        F.  w  r4VP	                  V\        4       4      P                  V4       K0  	  Ki  	  V# )a  Builds a reverse mapping dictionary

Iterates over all Unicode cmap tables and returns a dictionary mapping
glyphs to sets of codepoints, such as::

        {
                'one': {0x31}
                'A': {0x41,0x391}
        }

The values are sets of Unicode codepoints because
some fonts map different codepoints to the same glyph.
For example, ``U+0041 LATIN CAPITAL LETTER A`` and ``U+0391
GREEK CAPITAL LETTER ALPHA`` are sometimes the same glyph.
)r   	isUnicoder   itemsZ
setdefaultsetZaddr   Zresultr   Z	codepointr      &    r   buildReversedZtable__c_m_a_p.buildReversedy   sc      H!!##'/}}':':'<OI%%dCE266yA (= $ r   c                s    / pV P                    F^  pVP                  4       '       g   K  VP                  P                  4        F%  w  r4WA9   d   \	        W,          V4      W&   K!  W1V&   K'  	  K`  	  V# N)r   r   r   r   Zminr   r   r   buildReversedMinZtable__c_m_a_p.buildReversedMin   s`    H!!##'/}}':':'<OI~'*6<'C'0t	 (= $ r   c           	     s   \         P                  ! R VR,          4      w  r4\        V4      V n        . ;V n        p/ p\        V4       EFx  p\         P                  ! RV^V^,          ,           ^V^,           ^,          ,            4      w  rp
\        V4      \        V	4      r\         P                  ! R WV
^,            4      w  rVR9   d%   \         P                  ! RWV
^,            4      w  rpM)VR	9   d#   \         P                  ! RWV
^,            4      w  rV'       g   \        P                  RVV	VV
4       K  \        P                  V4      pWn
        Wn        VP                  WV
\        V4      ,            V4       W9   d'   RVn        WVV
,          ,          P                  Vn        MWvV
&   VP                  V4       EK{  	  VP                   RJ d   V P#                  4        R# R# )
>HHN   N>HHlz>HHLz>HLzrcmap subtable is reported as having zero length: platformID %s, platEncID %s, format %s offset %s. Skipping table.NF)   
         )i   )structunpackinttableVersionr   rangelogZerrorCmapSubtablenewSubtabler   r   decompileHeaderdatar   appendZlazyensureDecompiled)r   r4   ttFontr.   numSubTablesr   ZseenOffsetsir   r   offsetformatlengthreservedtables   &&&            r   	decompileZtable__c_m_a_p.decompile   s   %+]]5$r(%C"-!!f|$A,2MMQQYa!eq[9-)J6 %(
OS^	#]]5$
2KLNF(+1==D&1*5,(& 4!'udFQJ6O!P		I  ,,V4E)'O !!$V0D"EvN$!
#$78==
&'F#MM% G %H ;;%!!#  r   c                sL    V P                    F  pVP                  4        K  	  R # r!   )r   r6   )r   recurseZsts   && r   r6   Ztable__c_m_a_p.ensureDecompiled   s     ++B! r   c                sv   V P                   P                  4        \        V P                   4      p^^V,          ,           p\        P                  ! RV P
                  V4      pRp/ p/ pV P                    F  pVP                  \        VP                  4      4      p	V	f]   VP                  V4      p
VP                  V
4      p	V	f7   V\        V4      ,           ;p	;V\        VP                  4      &   Wz&   WZ,           pV\        P                  ! RVP                  VP                  V	4      ,           pK  	  WE,           # )r%   r#   r   r&   )r   sortr   r+   packr.   getZidr   compiler   r   )r   r7   r8   ZtotalOffsetr4   Z	tableDataZseenZdoner>   r:   Zchunks   &&         r   rD   Ztable__c_m_a_p.compile   s   4;;'!l**{{5$"3"3\B	 	  	 [[EXXbn-F~f-%>BMPS!Q C F T"UZZ.1DK !* 1I&++fe.>.>QWXXD ! r   c                s    VP                  R V P                  R7       VP                  4        V P                   F  pVP	                  W4       K  	  R# )r.   )versionN)	simpletagr.   newliner   toXML)r   writerr7   r>   r   r   rH   Ztable__c_m_a_p.toXML   s?    1B1BC[[EKK' !r   c                s   VR 8X  d   \        VR,          4      V n        R# VR,          R8w  d   R# \        V R4      '       g   . V n        \        VR,          4      p\        P                  V4      p\        VR,          4      Vn        \        VR,          4      Vn        VP                  WW44       V P                  P                  V4       R# )	r.   rE   NNr)   NZcmap_format_r   :r)   NNr   r   )
r   r.   hasattrr   r1   r2   r   r   fromXMLr5   )r   r   attrscontentr7   r;   r>      &&&&&  r   rL   Ztable__c_m_a_p.fromXML   s    >! (y)9 :D9&tX&&DK$s)$((0#E,$78"5#56d735!r   )r.   r   N)))   r(   )r       )r    r%   )rP      )r    rP   )r       )r    rR   )r    r    F)__name__
__module____qualname____firstlineno____doc__r   r   r    r"   r?   r6   rD   rH   rL   __static_attributes____classdictcell__Z__classdict__   @r   r   r      s?      D&'R.	*$X" 2(" "r   r   c                   s   a  ] tR t^t o Rt]R 4       t]R 4       tR tRR lt	R t
R tR tRR
 ltR tR tR tR tRtV tR	# )r1   a  Base class for all cmap subtable formats.

Subclasses which handle the individual subtable formats are named
``cmap_format_0``, ``cmap_format_2`` etc. Use :py:meth:`getSubtableClass`
to retrieve the concrete subclass, or :py:meth:`newSubtable` to get a
new subtable object for a given format.

The object exposes a ``.cmap`` attribute, which contains a dictionary mapping
character codepoints to glyph names.
c                s6    \         P                  V \        4      # )z'Return the subtable class for a format.)cmap_classesrC   cmap_format_unknown)r;      &r   getSubtableClassZCmapSubtable.getSubtableClass  s     (;<<r   c                s<    \         P                  V 4      pV! V 4      # )z:Return a new instance of a subtable for the given format
.)r1   ra   )r;   ZsubtableClass   & r   r2   ZCmapSubtable.newSubtable  s     %55f=V$$r   c                sX    Wn         R V n        R V n        R V n        R V n        R V n        R # r!   )r;   r4   r7   r   r   languager   r;      &&r   __init__ZCmapSubtable.__init__  s-    	 	r   c                sX    V P                   f   R # V P                  R R 4       R V n         R # r!   )r4   r?   )r   r@   re   r   r6   ZCmapSubtable.ensureDecompiled  s&     99tT"	r   c                s    VR ,          R8X  d   \        V4      hV P                  f   \        V4      hV P                  4        \        W4      # ):NrS   NZ__)ZAttributeErrorr4   r6   getattr)r   Zattrre   r   __getattr__ZCmapSubtable.__getattr__(  sE    8t &&99 &&t""r   c                s$   \         P                  ! R VR,          4      w  r4p\        V4      V8X  g   Q RV\        V4      V3,          4       h\        V4      V n        \        V4      V n        \        V4      V n        VR,          V n        W n        R# )>HHH:NrQ   NAcorrupt cmap table format %d (data length: %d, header length: %d):rQ   NNN)	r+   r,   r   r-   r;   r<   rc   r4   r7   )r   r4   r7   r;   r<   rc      &&&   r   r3   ZCmapSubtable.decompileHeader1  s    #)==b#B I	
NIR
 
	
 &k&kHH	r   c                s   VP                  V P                  P                  R V P                  3RV P                  3RV P
                  3.4       VP                  4        \        V P                  P                  4       4      pV P                  W14       VP                  V P                  P                  4       VP                  4        R# )r   r   rc   N)begintag	__class__rU   r   r   rc   rG   sortedr   r   _writeCodesendtagr   rI   r7   codesr   r   rH   ZCmapSubtable.toXML@  s    NN##t/dnn-T]]+	
 	tyy()'dnn--.r   Nc                sZ    \        V P                  V P                  V P                  V4      # )a  Returns the Python encoding name for this cmap subtable based on its platformID,
platEncID, and language.  If encoding for these values is not known, by default
``None`` is returned.  That can be overridden by passing a value to the ``default``
argument.

Note that if you want to choose a "preferred" cmap subtable, most of the time
``self.isUnicode()`` is what you want as that one only returns true for the modern,
commonly used, Unicode-compatible triplets, not the legacy ones.
)r   r   r   rc   )r   Zdefaultre   r   r   ZCmapSubtable.getEncodingO  s!     4??DNNDMM7SSr   c                s|    V P                   ^ 8H  ;'       g'    V P                   ^8H  ;'       d    V P                  R9   # )zEReturns true if the characters are interpreted as Unicode codepoints.)r    rR   r(   r   r   r   r`   r   r   ZCmapSubtable.isUnicode[  s:    !# 
 
OOq AAT^^z%A	
r   c                sN    V P                   ^8H  ;'       d    V P                  ^ 8H  # )z=Returns true if the subtable is for the Symbol encoding (3,0)rs   rt   r`   r   isSymbolZCmapSubtable.isSymbola  s"    !#;;!(;;r   c                s    V P                  4       pV FV  w  rEVP                  R \        V4      VR7       V'       d   VP                  \        V,          4       VP                  4        KX  	  R# )map)coder   N)r   rF   hexZcommentr   rG   )r   rr   rI   r   rw   r   rk   r   ro   ZCmapSubtable._writeCodese  sP    NN$	JDUT>wt}-NN	  r   c                s   \        V\        4      '       g   \        # \        V R R4      \        V RR4      \        V RR4      V P                  3p\        VR R4      \        VRR4      \        VRR4      VP                  3pW#8  # )r   Nr   rc   )
isinstancer1   ZNotImplementedrg   Z__dict__)r   ZotherZ	selfTupleZ
otherTuples   &&  r   __lt__ZCmapSubtable.__lt__m  s    %..!! D,-D+t,D*d+MM	
	 E<.E;-E:t,NN	

 %%r   )r4   r;   rc   r<   r   r   r7   rT   r!   )rU   rV   rW   rX   rY   Zstaticmethodra   r2   rf   r6   rh   r3   rH   r   r   ru   ro   rz   rZ   r[   r\   r]   r   r1   r1      sj     	 = = % %
#
T
<& &r   r1   c                   2   a  ] tR tRt o R tR tR tRtV tR# )cmap_format_0i  c                s`   Ve   Ve   V P                  W4       MVf   Ve   Q R4       hV P                  pRV P                  8X  g   Q R4       h\        P                  ! R4      pVP	                  V P                  4       \        \        V4      4      p\        V P                  WC4      V n	        R # )N#Need both data and ttFont arguments  z$Format 0 cmap subtable not 262 bytesB)
r3   r4   r<   array	frombytesr/   r   r   r7   r   )r   r4   r7   r
   	charCodess   &&&  r   r?   Zcmap_format_0.decompile  s      2  . 545/ II 	 dkk!I#II!{{3tyy!#d)$	dkk9;	r   c                s\   V P                   '       d5   \        P                  ! R ^ RV P                  4      V P                   ,           # V P                  p\        VP                  4       4      P                  \        R4      4      '       g   Q hVP                  p\        R4       Uu. uF  qDV9   d   V! W$,          4      M^ NK  	  pp\        P                  ! RV4      p\        P                  ! R ^ RV P                  4      VP                  4       ,           p\        V4      R8X  g   Q hV# u upi )ri   r~      r   )r4   r+   rB   rc   r   r   keysZissubsetr/   
getGlyphIDr   tobytesr   )r   r7   r   r   r9   	valueListr
   r4   s   &&      r   rD   Zcmap_format_0.compile  s    999;;vq#t}}=		IIyy499;((s4444&&
FKCjQjIZ(1<j	Q{{3	*{{61c4==9DLLNJ4yC Rs   %D)c                   \        VR ,          4      V n        \        V R4      '       g   / V n        V P                  pV FE  p\	        V\
        4      '       g   K  Vw  rpVR8w  d   K)  VR,          V\        VR,          4      &   KG  	  R# rc   r   rv   r   rw   Nr   rc   rK   r   ry   tupler   r   rM   rN   r7   r   elementrO   r   rL   Zcmap_format_0.fromXML  su     z!23tV$$DIyyGgu--#* Du},1&MD%-() r   )r   rc   N	rU   rV   rW   rX   r?   rD   rL   rZ   r[   r\   r]   r   r|   r|     s     <$: :r   r|   z>HHhHc                   s&   a  ] tR tRt o R tRtV tR# )	SubHeaderi  c                sL    R V n         R V n        R V n        R V n        . V n        R # r!   )	firstCode
entryCountidDeltaidRangeOffsetglyphIndexArrayrt   r`   r   rf   ZSubHeader.__init__  s'    !!r   )r   r   r   r   r   N)rU   rV   rW   rX   rf   rZ   r[   r\   r]   r   r   r     s     " "r   r   c                   s8   a  ] tR tRt o R tR tR tR tRtV t	R# )cmap_format_2i  c                s   ^ Vn         VP                  ^ ,          pVP                   F  pV^ 8w  g   K  W28  g   K  TpK  	  V^8  d   VR8  d   RV,
          ) ^,
          Vn         MV^,
          Vn         VP                   p\        VP                  4       F4  pVP                  V,          pV^ 8  g   K  W4,
          VP                  V&   K6  	  R# R# )r    i     N)r   r   r/   r   )r   	subHeaderZminGIr   r   r9   s   &&    r   
setIDDeltaZcmap_format_2.setIDDelta  s    	))!,,,Cqs{ - 19v~&-o$6$:	!$)AI	!''G9//0//2736=I--a0 1 r   c                s   Ve   Ve   V P                  W4       MVf   Ve   Q R4       hV P                  p. p^ p\        P                  ! R4      pVP                  VR,          4       VR,          p\        P
                  R8w  d   VP                  4        V Uu. uF  qf^,          NK  	  pp\        V4      p. p^ p\        V^,           4       F  p	\        4       p
\        P                  ! \        WV^,            4      w  V
n        V
n        V
n        V
n        V^,          pWP                   ,           ^,
          p\        P                  ! R4      pVP                  WWP                  ^,          ,            4       \        P
                  R8w  d   VP                  4        Wn        VP%                  V
4       K  	  RV n        / p^ p\        R4       EF0  pW?,          pVV,          p
V^ 8X  d   WP                  8  g"   WP                  V
P                  ,           8  d   KO  TpWP                  ,
          pV
P"                  V,          pV^ 8w  d   VV
P                  ,           R,          pMK  VVV&   K  V
P                  '       g   K  VR,          V
P                  ,           p\        V
P                  4       FH  pVV,           pV
P"                  V,          pV^ 8w  d   VV
P                  ,           R,          pMKC  VVV&   KJ  	  EK3  	  \'        VP)                  4       4      p\'        VP+                  4       4      p\-        V P.                  VV4      V n        R # u upi )	Nr}   H:N   N:r   NNbigr   r   r   )r3   r4   r   r   sys	byteorderbyteswapZmaxr/   r   r+   r,   subHeaderFormatr   r   r   r   r   r5   listvaluesr   r   r7   r   )r   r4   r7   subHeaderKeysZmaxSubHeaderindexZallKeyskeysubHeaderListposr9   r   Z	giDataPosZgiListr   notdefGIZ	firstByteZsubHeadindexcharCodeZoffsetIndexgiZcharCodeOffsetr
   r      &&&                    r   r?   Zcmap_format_2.decompile  s     2  . 545/ II 	 ++c"$t*%Dz==E!-45WcW5. (1,-A!I ot#'/BC#$!'1HC5559I[[%FTi:N:NQR:R.RST}}%!(.%  + .j 	sI(3L%l3Iq  3 33!4!4y7K7K!KK(H"+.A.A"AK"22;?BQw 9#4#44? !#X'''%._y7J7J%JN',Y-A-A'B#1K#?&66{C7"$y'8'8"8G!CB$)+X (C) $@ DKKM"%	dkk9d;	A 6s   Mc           
     s   V P                   '       dI   \        P                  ! R V P                  V P                  V P
                  4      V P                   ,           # Rp^ p\        V P                  P                  4       4      pV Uu. uF  qU^ ,          NK  	  ppV Uu. uF  qU^,          NK  	  ppVP                  4       p V U	u. uF  qV	,          NK  	  p
p	\        R4       Uu. uF  qNK  	  pp. pT^ ,          pT^8  d8   \        4       p^ Tn        ^ Tn        ^ Tn        ^ Tn        TP                  T4       Rp\)        Yj4      pT EF  w  rT^ 8X  d   K  T^,	          pT^,          pTT8w  d   TR8  dw   T P+                  X4       T^ 8X  d4   \        TP"                  4       F  pTP                   T,           p^ Y&   K  	  TP"                  \-        TP.                  4      8X  g   Q R4       h\        4       pTTn        ^Tn        TP.                  P                  T4       TP                  T4       \-        T4      ^,
          TT&   TpEK  TXP                   TP"                  ,           ,
          p\        T4       F  pTP.                  P                  T4       K   	  TP.                  P                  T4       TP"                  T,           ^,           Tn        EK  	  T P+                  X4       \        4       p^ Tn        ^ Tn        ^ Tn        ^Tn        TP                  T4       \-        T4      ^,
          p\        R4       F  pTT,          T8X  g   K  TTT&   K  	  \-        T4      ^,
          ^,          ^,           p\-        T4      ^,
          p\        T4       F  pTT,          p^ Tn        \        T4       FV  pTT,          pTP.                  TP.                  8X  g   K)  TP&                  TT,
          ^,          ,
          Tn        . Tn         M	  TP&                  ^ 8X  d+   TTn        T^,
          TP"                  ^,          ,           pK  T^,
          pK  	  R^\-        T4      ,          ,           pTRR  F&  pT\-        TP.                  4      ^,          ,           pK(  	  \        P                  ! R ^TT P
                  4      .pT F0  pTP                  \        P                  ! R	T^,          4      4       K2  	  T FX  pTP                  \        P                  ! \0        TP                   TP"                  TP$                  TP&                  4      4       KZ  	  TRR  F<  pTP.                   F)  pTP                  \        P                  ! R	T4      4       K+  	  K>  	  \3        T4      p \-        T 4      T8X  g8   Q R
\5        \-        T 4      4      ,           R,           \5        T4      ,           4       hT # u upi u upi u up	i   \         d    TP                  RR7      p T U	u. uF  qT	,          NK  	  Mu up	i p
p	 ELh  \         d    . p
T Fs  p	 Y,          pMU  \         dH     T	R,          R8X  d   \        T	R,          4      p M'TP                  T	4      p M   \        T	4      h; ii ; iT
P                  T4       Ku  	    ELi ; ii ; iu upi )ri   TZrebuildNrP   Nr   rP   NNr   zCError - subhead entry count does not match len of glyphID subrange.Nz>Hz?Error: cmap format 2 is not same length as calculated! actual: z calc : i  )r4   r+   rB   r;   r<   rc   rn   r   r   getReverseGlyphMapKeyErrorr-   r   r5   r/   r   r   r   r   r   r	   r   r   r   r   r   str)!r   r7   ZkEmptyTwoCharCodeRanger   r   itemr   namesnameMapr   r
   r   Zxr   r   r   r   ZlastFirstByteZ	firstbyteZ
secondByteindexZcodeDiffr9   ZemptySubheadIndexr   ZsubheadRangeLenZjZprevSubheadr<   ZsubheaddataListr   r4   s!   &&                               r   rD   Zcmap_format_2.compileP  sR   999FDKKdmmLtyyX "$tyy())./!WW	/%*+UTaU+++-	%.34edDMMeD4< -2#J
,6q"J 	 
 
 Q<c>!I"#I#$I  !I&'I#  +I$"MHax AI!F*J ]* 2%OOI. %)%*9+?+?%@E'0':':U'BH67M3 &A %//3!114  ]\]  &K	&0	#'(	$))005$$Y/+.}+=+Ai( ) &)<)<y?S?S)STxA--44X> )))005'0';';h'F'J	$K #P 		" K		 		"#	Y'.23ZEU#'=='8e$   " " 	 ?+E%e,I&'I#5\+A.//93L3LL $11UQY!OC + 13I- " &&!+*7	'!A%((1,!- !. 1' ,. a#m,,, 	 %Sb)GW44599  * KK64==AB"EOOFKKeai89 #$GOO#%%&&OO)) % %Sb)G--D" 56 . * "4yF" 	
M#d)n &k	
" Q 0+ 5 	%///=G%278%$%88 %!D	1%m# 11#Bx50&)$r(m&,&7&7&=1"*4.01 KK$ "%		%8
s   W3W8X W=X %
[=X [ Y $X65Y  [Y[Z.	( Z[
Z[Z**Z.	.[[
[[c                r   r   r   r   rO   r   rL   Zcmap_format_2.fromXML  u     z!23tV$$DIyyGgu--#* Du},1&MD%-() r   r   r4   rc   N)
rU   rV   rW   rX   r   r?   rD   rL   rZ   r[   r\   r]   r   r   r     s#     A8u<nqf: :r   r   z>7Hc                 s
   W8X  d   . V.3# W ,          pT pR pR p. p\        V ^,           V^,           4       FL  pW(,          p	V	^,
          V8X  d   Ve	   V'       g   ^pTpMV'       d   ^ pVP                  Wd34       R pT	pTpKN  	  V'       d   VP                  Wd34       WA8X  g   Q h. p
V FL  w  rW8X  d	   W8X  d    M=W8X  g   W8X  d   ^pM^pW,
          ^,           V8  g   K:  V
P                  W34       KN  	  T
pV'       g   . V.3# V^ ,          ^ ,          V 8w  d)   VP                  ^ W^ ,          ^ ,          ^,
          34       VR,          ^,          V8w  d)   VP                  VR,          ^,          ^,           V34       ^pV\        V4      8  d   W~^,
          ,          ^,          ^,           W~,          ^ ,          8w  dM   VP                  WV^,
          ,          ^,          ^,           W~,          ^ ,          ^,
          34       V^,           pV^,           pK  . p. pV F'  w  rVP                  V4       VP                  V4       K)  	  VP	                  ^ 4       \        V4      ^,           \        V4      8X  g   Q hVV3# )Nr   )r/   r5   Zinsertr   Zpop)	startCodeendCoder   ZlastIDlastCodeZinOrderZorderedBeginZ	subRangesrw   glyphIDZ	newRangesZbZeZ	thresholdr9   startends   &&&              r   
splitRanger     sW   
 G9}_FHGLI i!mWq[1*Q;& g'  ,!9:# 2  ,12
 I>al>Q\IIEAI"aV$  IG9}|A)#Y!Q!(;<=}Q7")B-*Q.89 	
A
c)n
UA"il1o5Q1q5!1!!4q!8),q/A:M NOAAE E
CQ

1  
IIaLu:>SX%%%#:r   c                   r{   )cmap_format_4ik  c                s   Ve   Ve   V P                  W4       MVf   Ve   Q R4       hV P                  p\        P                  ! RVR,          4      w  r4rVVR,          pV^,          p\        P                  ! R4      pVP                  V4       R ;V n        p\        P                  R8w  d   VP                  4        VR V p	W^,           R  pVR V p
WR  pVR V pWR  pVR V pWR  p\        V4      p. p. p\        \        V
4      ^,
          4       EF  pV
V,          pVV,          pVV,          pV^,          V,
          V,           \        V4      ,
          p\        \        V
V,          V	V,          ^,           4      4      pVP                  V4       V^ 8X  d2   TP                  V Uu. uF  pVV,           R,          NK  	  up4       K  V F]  pVV,           pVV8  g   Q RVVV3,          4       hVV,          ^ 8w  d   VV,          V,           pM^ pVP                  VR,          4       K_  	  EK  	  \        V P                  VV4      V n        R # u upi )	Nr}   z>4H:Nr'   N:r'   NNr   r     zIn format 4 cmap, range (%d), the calculated index (%d) into the glyph index array is not less than the length of the array (%d) !)r3   r4   r+   r,   r   r   r   r   r   r   r/   r   extendr5   r   r7   r   )r   r4   r7   
segCountX2searchRangeentrySelector
rangeShiftsegCountZallCodesr   r   r   r   r   Z
lenGIArrayr   r
   r9   r   ZdeltaZrangeOffsetZpartialZrangeCharCodesr   r   r   s   &&&                       r   r?   Zcmap_format_4.decompilel  so     2  . 545/ II 	 @F}}48@
<- Bx?;;s#4 	D==E! 9H%qLN+Yh'	I&9H%I& (+"9-)
 	s9~)*AaLEAJE'*K!Q&.2S5GGG!%	!gaj1n"EFN^,aAOPXh&&00P !/H$w.E :-  ]eZ01- 'u-2"1%"85"@"#KK& 01 !/ +2 dkk9d;	 Qs   *I
c                s:   V P                   '       dI   \        P                  ! R V P                  V P                  V P
                  4      V P                   ,           # \        V P                  P                  4       4      pV'       g	   R.pR.pEMEVP                  4        V Uu. uF  qPP                  V,          NK  	  ppVP                  4       p V Uu. uF  qV,          NK  	  p	p/ p\        Y)4       F	  w  rZYT&   K  	  T^ ,          p. pT.pTR,           F^  pY^,           8X  d   TpK  \!        TR,          Y4      w  rTP#                  T4       TP#                  T4       TP                  T4       TpK`  	  \!        TR,          Y4      w  rTP#                  T4       TP#                  T4       TP                  R4       TP                  R4       . p. p. p\%        \'        V4      ^,
          4       EF  p. p\%        VV,          VV,          ^,           4       F  pVP                  XV,          4       K  	  V\        \%        V^ ,          V^ ,          \'        V4      ,           4      4      8X  dA   VP                  V^ ,          VV,          ,
          R,          4       VP                  ^ 4       K  VP                  ^ 4       VP                  ^\'        V4      \'        V4      ,           V,
          ,          4       VP#                  V4       EK  	  VP                  ^4       VP                  ^ 4       \'        V4      pV^,          p\)        V^4      w  ppp\*        P*                  ! R	V^ .,           V,           4      p\*        P*                  ! R	V4      p\*        P*                  ! R	VV,           4      p\,        P.                  R
8w  d   VP1                  4        \,        P.                  R
8w  d   VP1                  4        \,        P.                  R
8w  d   VP1                  4        VP3                  4       VP3                  4       ,           VP3                  4       ,           p\        P4                  ! \6        4      \'        V4      ,           p\        P                  ! \6        V P                  VV P
                  VVVV4      pVV,           # u upi u upi   \         d    TP                  RR7      p T Uu. uF  qT,          NK  	  Mu upi p	p EL$  \         d    . p	T Fs  p Yx,          p
MU  \         dH     TR,          R8X  d   \        TR,          4      p
 M'TP                  T4      p
 M   \        T4      h; ii ; iT	P                  T
4       Ku  	    ELi ; ii ; i)ri   r   Tr   r   r   r   rR   NNr   r   r   r   )r4   r+   rB   r;   r<   rc   r   r   r   rA   r   r   r-   r   r5   r	   r   r   r/   r   r   r   r   r   r   r   Zcalcsizecmap_format_4_format) r   r7   r   r   r   rw   r   r   r   r
   r   r   r   r   r   r   r   r   r   r9   Zindicesr   r   r   r   r   ZcharCodeArrayZidDeltaArrayZ	restArrayr4   r<   headers    &&                              r   rD   Zcmap_format_4.compile  s   999FDKKdmmLtyyX )*	IhGNN1:;YYt__E;//1G)278%$%8* D 1	 T
 2 !|HG!
I%  !|+'H'	"xF
  's#  *# $IbM8BJEU#NN3V$NN6" s7|a'(AG!)A,
Q?tH~. @$uWQZc'l1JKLL
Yq\ 9WDE$$Q'q!$$Q#g,_9M*MPQ*Q%RS&&w/ ) 	qQ w<\
1?!1L.]JCA3)BC{{30KK]_%DE	==E!""$==E!!!#==E! $$&)=)=)??)BSBSBUU!56TB KKMM	
 }C < 9 ) 33D3A)6;<edDMMe<D<D )D %	5")-C' 55#'8u#4*-d2h-C*0*;*;D*AC5&.tn 45 C( !&)	)s   "SS S%S S V+T/T TVT'&V'U9	3 U(VU(&V(U55U9	9VVVVc                s   \        VR ,          4      V n        \        V R4      '       g   / V n        V P                  pV FJ  p\	        V\
        4      '       g   K  Vw  rxp	VR8w  d   Q R4       hVR,          V\        VR,          4      &   KL  	  R# )rc   r   rv   z%Unrecognized keyword in cmap subtabler   rw   Nr   )
r   r   rM   rN   r7   r   r   r   ZattrsMapZdummyContents
   &&&&&     r   rL   Zcmap_format_4.fromXML  s     z!23tV$$DIyyGgu--.5+G|%AAAq/7/?D(6*+, r   r   Nr   r\   r]   r   r   r   k  s     A<Fm^@ @r   r   c                   r{   )cmap_format_6i-  c           	     s&   Ve   Ve   V P                  W4       MVf   Ve   Q R4       hV P                  p\        P                  ! RVR,          4      w  r4\	        V4      pVR,          p\
        P
                  ! R4      pVP                  VR ^\	        V4      ,           4       \        P                  R8w  d   VP                  4        R ;V n        p\        \        W3\        V4      ,           4      4      p\        V P                  We4      V n        R # )Nr}   r#   r$   :r%   NNr   r   )r3   r4   r+   r,   r-   r   r   r   r   r   r   r/   r   r   r7   r   )r   r4   r7   r   r   r
   r   s   &&&    r   r?   Zcmap_format_6.decompile.  s      2  . 545/ II 	 !'eT"X >		N	Bx{{3t1a#j/123==E!MMO	Dyc$i*?@A	dkk9;	r   c           
     s
   V P                   '       dI   \        P                  ! R V P                  V P                  V P
                  4      V P                   ,           # V P                  p\        VP                  4       4      pV'       d   \        \        V^ ,          VR,          ^,           4      4      pV^ ,          pV Uu. uF"  qUV9   d   VP                  W%,          4      M^ NK$  	  pp\        P                  ! RV4      p\        P                  R8w  d   VP                  4        VP!                  4       pMRp^ p\        P                  ! R^\#        V4      ^
,           V P
                  V\#        V4      4      p	W,           # u upi )ri   r   r   r   z>HHHHHr   )r4   r+   rB   r;   r<   rc   r   rn   r   r   r/   r   r   r   r   r   r   r   )
r   r7   r   rr   r   rw   r   r
   r4   r   s
   &&        r   rD   Zcmap_format_6.compileH  s$   999FDKKdmmLtyyX yytyy{#uQxrQ78EaIQVQV!!$*-1DQV   ;;sI.D}}%<<>DDIaTR	3u:
 }s   ?(F c                r   r   r   r   rO   r   rL   Zcmap_format_6.fromXMLa  r   r   r   Nr   r\   r]   r   r   r   -  s     <42: :r   r   c                   sD   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
cmap_format_12_or_13ip  c                s<    Wn         ^ V n        RV n        RV n        R# r    N)r;   r=   r4   r7   rd   re   r   rf   Zcmap_format_12_or_13.__init__q  s    	r   c                sF   \         P                  ! R VR,          4      w  r4rVp\        V4      ^V^,          ,           u;8X  d   V8X  g'   M Q RV P                  \        V4      V3,          4       hW0n        W@n        WPn        W`n        Wpn        VR,          V n        W n	        R# )>HHLLL:N   Nrj   :r   NNN)
r+   r,   r   r;   r=   r<   rc   nGroupsr4   r7   )r   r4   r7   r;   r=   r<   rc   r   r   r   r3   Z$cmap_format_12_or_13.decompileHeaderw  s    6<mmHdSVi6X3&GI"w|+88	
NKKIR
 
	
8   I	r   c                s   Ve   Ve   V P                  W4       MVf   Ve   Q R4       hV P                  p. p. p^ p\        P                  ! RVR V P                  ^,           4      p\        P
                  R8w  d   VP                  4        \        V P                  4       F  pWg^,          ,          pWg^,          ^,           ,          p	Wg^,          ^,           ,          p
^V	,           V,
          pVP                  \        W^,           4      4       VP                  V P                  W4      4       K  	  R ;V n        p\        V P                  W44      V n        R # )Nr}   ZIr   )r3   r4   r   r   r   r   r   r/   r   _computeGIDsr   r7   r   )r   r4   r7   r   r
   r   Zgroupsr9   startCharCodeZendCharCoder   ZlenGroups   &&&         r   r?   Zcmap_format_12_or_13.decompile  s(     2  . 545/ II 	 	S$':):";<==E!OOt||$A"q5MM Q+KUQY'G;6HU=/BCKK))'<= %  	Ddkk9;	r   c           	     s   V P                   '       d_   \        P                  ! R V P                  V P                  V P
                  V P                  V P                  4      V P                   ,           # \        V P                  P                  4       4      p\        V P                  P                  4       4      pVP                  4       p V Uu. uF  qTV,          NK  	  pp/ p\#        Y&4       F	  w  rYxT	&   K  	  TP%                  4        ^ p
T^ ,          pY,          pYP&                  ,
          pT^,
          p^ p. p\)        T4      p\+        T4       Ff  p
Y*,          pTT,          pT P-                  TTTT4      '       g5   TP!                  \        P                  ! RYT4      4       TpTpT^,           pTpTpKh  	  TP!                  \        P                  ! RYT4      4       T^,           p\/        T4      p\)        T4      ^,           p\)        T4      T^,          u;8X  d   T^,
          8X  g   Q h Q h\        P                  ! R T P                  T P                  TT P                  T4      T,           # u upi   \         d    TP                  RR7      p T Uu. uF  qTT,          NK  	  Mu upi pp EL  \         d    . pT Fs  p YE,          pMU  \         dH     TR,          R8X  d   \        TR,          4      p M'TP                  T4      p M   \        T4      h; ii ; iTP!                  T4       Ku  	    ELai ; ii ; i)r   Tr   r   r   r   z>LLL)r4   r+   rB   r;   r=   r<   rc   r   r   r   r   r   r   r   r-   r   r5   r	   rA   _format_stepr   r/   _IsInSameRunr   )r   r7   r   r   r   r   r
   r   r   rw   r   r   ZstartGlyphIDlastGlyphIDlastCharCoder   r   ZmaxIndexr   r   r4   ZlengthSubtables   &&                    r   rD   Zcmap_format_12_or_13.compile  s   999KKMMKKMMLL ))
 )*	TYY%%'(++-	%.34edDMMeD4, Y-IDJ . 	!!*"%6%66$q(y>8_E 'H8nG$$Wk8\RRKK\R !)&!A+!K#L % 	FMVWA+"TR4yWr\C~/BCCCCCKK 
	
i 5 	%///=G%278%$%88 %!D	1%m# 11#Bx50&)$r(m&,&7&7&=1"*4.01 KK$ "%		%s   I8 I3I8 3I8 8MJ6J,+J66M	KML$	 L>M LML  L$	$M<M MMc                s   VP                  V P                  P                  R V P                  3RV P                  3RV P
                  3RV P                  3RV P                  3RV P                  3RV P                  3.4       VP                  4        \        V P                  P                  4       4      pV P                  W14       VP                  V P                  P                  4       VP                  4        R# )r   r   r;   r=   r<   rc   r   N)rl   rm   rU   r   r   r;   r=   r<   rc   r   rG   rn   r   r   ro   rp   rq   r   r   rH   Zcmap_format_12_or_13.toXML  s    NN##t/dnn-4;;'T]]+4;;'T]]+DLL)	
 	tyy()'dnn--.r   c                s   \        VR ,          4      V n        \        VR,          4      V n        \        VR,          4      V n        \        VR,          4      V n        \        VR,          4      V n        \        V R4      '       g   / V n        V P                  pV FE  p\        V\        4      '       g   K  Vw  rpVR8w  d   K)  VR,          V\        VR,          4      &   KG  	  R	# )
r;   r=   r<   rc   r   r   rv   r   rw   N)
r   r;   r=   r<   rc   r   rK   r   ry   r   r   rO   r   rL   Zcmap_format_12_or_13.fromXML	  s    uX/ z!23uX/ z!23i 01tV$$DIyyGgu--#* Du},1&MD%-() r   )r   r4   r;   rc   r<   r   r=   r7   N)rU   rV   rW   rX   rf   r3   r?   rD   rH   rL   rZ   r[   r\   r]   r   r   r   p  s*     "<:O
b&: :r   r   c                   s:   a  ] tR tRt o ^tRR ltR tR tRtV t	R# )cmap_format_12i  c                0    \         P                  W4       R # r!   r   rf   rd   re   r   rf   Zcmap_format_12.__init__      %%d3r   c                s&    \        WV,           4      # r!   )r/   r   ZstartingGlyphZnumberOfGlyphs   &&&r   r   Zcmap_format_12._computeGIDs"  s    ]N$BCCr   c                sB    V^V,           8H  ;'       d    V^V,           8H  # rR    r   r   r   r   r      &&&&&r   r   Zcmap_format_12._IsInSameRun%  s#    1{?*NNQ=M1MNr   r   N)r)   
rU   rV   rW   rX   r   rf   r   r   rZ   r[   r\   r]   r   r   r     s!     L4DO Or   r   c                   s:   a  ] tR tRt o ^ tRR ltR tR tRtV t	R# )cmap_format_13i)  c                r   r!   r   rd   re   r   rf   Zcmap_format_13.__init__,  r   r   c                s    V.V,          # r!   r   r   r   r   r   Zcmap_format_13._computeGIDs/  s    //r   c                s2    W8H  ;'       d    V^V,           8H  # r   r   r   r   r   r   Zcmap_format_13._IsInSameRun2  s    &JJX\9I-IJr   r   N)r*   r   r\   r]   r   r   r   )  s      L40K Kr   r   c                 sJ    R V ,           p\         P                  ! RV4      w  pV# )s    >L)r+   r,   )ZthreeByteStringr4   vals   &  r   cvtToUVSr   6  s#    ?"D]]4&FSJr   c                 sj    ^ T u;8:  d	   R8  g   Q h Q h\         P                  ! RV 4      pVR,          # )r    i   r   r   )r+   rB   )r   ZfourByteStringrb   r   
cvtFromUVSr   <  s6    i[[s+N"r   c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	cmap_format_14iB  c                s    \         P                  ! R VR,          4      w  r4pVR,          V n        W@n        WPn        W n        ^V n        R# )>HLL:Nr(   N:r(   NNN)r+   r,   r4   r<   numVarSelectorRecordsr7   rc   )r   r4   r7   r;   r<   r   rk   r   r3   Zcmap_format_14.decompileHeaderC  s>    06fd3i0P--I	%:"r   c           	     s   Ve   Ve   V P                  W4       MVf   Ve   Q R4       hV P                  p/ V n        / p^ p\        V P                  4       EF  p\
        P                  ! RWV^,            4      w  rgpV^,          p\        V4      p	V'       d   V^
,
          p
\
        P                  ! RWV
^,            4      w  pV
^,          p
\        V4       F  p\
        P                  ! RWV
^,            4      w  rV
^,          p
\        V4      pV^,           p\        \        WV,           4      4      pR .V,          p\        VV4      p W9,          P                  V4       K  	  V'       g   EK  V^
,
          p
\
        P                  ! RWV
^,            4      w  pV
^,          p
. p\        V4       Fh  p\
        P                  ! RWV
^,            4      w  ppV
^,          p
\        V4      pV P                  P                  V4      pVP                  VV34       Kj  	   W9,          P                  V4       EK  	  W0n        R #   \         d    \        T4      Y9&    EK  i ; i  \         d
    TY9&    EK!  i ; i)Nr}   >3sLLr   >3sB>3sH)r3   r4   r   r/   r   r+   r,   r   r   r	   r   r   r7   ZgetGlyphNamer5   uvsDict)r   r4   r7   r   Z	recOffsetZnuvsdefOVSOffsetnonDefUVSOffsetZvarUVSZstartOffsetZ	numValuesZruvZaddtlCntZfirstBaseUVcntZ
baseUVListZ	glyphListZlocalUVListZnumRecsr   Z	glyphNamer   r   r?   Zcmap_format_14.decompileK  sR    2  . 545/yy  		 	t112A17)b.92.C OIc]F*R/%}}T4kTUo3VWq y)A#)==;? C$LB  1$K"*2,K"Q,C!%eKs9J&K!LJ!%I"%j)"<K<..{; * -2#]]4KRSO1TU
q  wA$mmFD{UV4WXGB1$K!"B $ 8 8 =I&&I7 (2O**;7K 3R ' $ <*.{*;<    2&1GO2s$   I I$I! I!$I87I8c                s^   VP                  V P                  P                  R V P                  3RV P                  3.4       VP                  4        V P                  p\        VP                  4       4      pV F|  pW5,          pVP                  R R7       V FX  w  rxR\        V4      3R\        V4      3.p	Ve   V	P                  RV34       VP                  RV	4       VP                  4        KZ  	  K~  	  VP                  V P                  P                  4       VP                  4        R# )	r   r   c                 s:    V ^,          RJV ^ ,          V ^,          3# )rR   Nr   )r   r`   r   Z<lambda>Z&cmap_format_14.toXML.<locals>.<lambda>  s    $q'*=tAwQ)Pr   )r   r   r   Nr   rv   )rl   rm   rU   r   r   rG   r   rn   r   rA   rx   r5   rF   rp   )
r   rI   r7   r   uvsListr   ZuvListr   gnamerM   s
   &&&       r   rH   Zcmap_format_14.toXML  s    NN##t/dnn-	
 	,,(C\FKKPKQ#	B5#c(*;<$LL&%1  .  $  	dnn--.r   c                s   ^V n         \        V R4      '       g   / V n        \        V R4      '       g   / V n        V P                  pRpV F  p\	        V\
        4      '       g   K  Vw  rpVR8w  d   K)  \        VR,          4      p\        VR,          4      p	VP                  R4      p
V
R8X  d"   Vf   RVP                  4       9   pV'       g   Rp
 XV,          P                  W34       K  	  R#   \         d    Y3.XT&    K  i ; i)	i   r   r   Nrv   r   r   r   ZNone)rc   rK   r   r   ry   r   r   rC   ZgetGlyphOrderr5   r   )r   r   rM   rN   r7   r   Z_hasGlyphNamedNoner   r   r   r   s   &&&&&      r   rL   Zcmap_format_14.fromXML  s    tV$$ I tY''DLllG
 "Ggu--#* Du}5<(C%+&BIIf%E%-)/63G3G3I)I&) E-##RK0    -!#}-s   C00DDc                s   V P                   '       dI   \        P                  ! R V P                  V P                  V P
                  4      V P                   ,           # V P                  p\        VP                  4       4      p\        V4      V n        ^
V P
                  ^,          ,           p. p. pV EFX  pW',          pV U	u. uF  q^,          e   K  V	NK  	  p
p	V
'       Ed!   V
 U	u. uF  q^ ,          NK  	  p
p	TpV
P                  4        V
^ ,          pRp. pV
 FX  pV^,          pW,           V8w  g   K  \        P                  ! R\        V4      V^,
          4      pTpVP                  V4       ^ pKZ  	  \        P                  ! R\        V4      V4      pVP                  V4       \        V4      pVP                  \        P                  ! RV4      4       VP                  V4       V^V^,          ,           ,          pM^ pV U	u. uF  q^,          f   K  V	NK  	  pp	V'       d   TpVP                  4        \        V4      pVP                  \        P                  ! RV4      4       V^V^,          ,           ,          pV FI  w  ppVP                  V4      p\        P                  ! R\        V4      V4      pVP                  V4       KK  	  M^ p\        P                  ! R\        V4      VV4      pVP                  V4       EK[  	  \        V4      \        V4      ,           p^
\        V4      ,           V n        \        P                  ! R V P                  V P                  V P
                  4      pVV,           # u up	i u up	i u up	i )r   r   r   r   r   r   )r4   r+   rB   r;   r<   r   r   rn   r   r   rA   r   r5   r   r   r   )r   r7   r   r   r:   r4   ZvarSelectorRecordsr   Z	entryListZentryZdefListr   ZlastUVr   ZdefRecsZdefEntryZrecZ
numDefRecsZndefListr   ZnumNonDefRecsr   r   r   ZndrecZvrecZ
headerdatas   &&                         r   rD   Zcmap_format_14.compile  s   999DKKd6P6P )) ,,(%(\"++b00 	 CI*3H)Qxuu)GHw189889%  'H1HC1$kk&*V2DcAgN!)s+ !( kk&*V*<cBs# \
FKKj9:G$!j1n,, +4M9%a9HM"( #HFKKm<=!ma///!)IB ++E2C"KK
2DEKK& "*
 #$;;w
3WD%%d+] ` +,y>3t9n[[DKKd.H.H

 D  g I92 Ns    M?M?&NN	N	)r   r4   rc   r<   r   r7   r   N)rU   rV   rW   rX   r3   r?   rH   rL   rD   rZ   r[   r\   r]   r   r   r   B  s'     7r. -DG! G!r   r   c                   r   )	r_   i  c                sd   V P                   P                  R ,          \        V P                  4      ,           pVP	                  VRV P
                  3RV P                  3.4       VP                  4        VP                  V P                  4       VP                  V4       VP                  4        R# )rJ   r   r   N)rm   rU   r   r;   rl   r   r   rG   Zdumphexr4   rp   )r   rI   r7   ZcmapNamer   r   rH   Zcmap_format_unknown.toXML  s    >>**3/#dkk2BBt/dnn-	
 	tyy!hr   c                s4    \        V4      V n        / V n        R # r!   )r   r4   r   )r   r   rM   rN   r7   r   r   rL   Zcmap_format_unknown.fromXML  s    G$		r   c                s     ^ V n         Wn        R# r   )rc   r4   r   r4   r7   r   r   r3   Z#cmap_format_unknown.decompileHeader  s    	r   c                sZ    Ve   Ve   V P                  W4       R # Vf   Ve   Q R4       hR # )Nr}   )r3   r   r   r   r?   Zcmap_format_unknown.decompile  s:      2  . 545/r   c                sB    V P                   '       d   V P                   # R # r!   )r4   )r   r7   re   r   rD   Zcmap_format_unknown.compile(  s    99999r   r   N)rU   rV   rW   rX   rH   rL   r3   r?   rD   rZ   r[   r\   r]   r   r_   r_     s#     5 r   r_   )'ZfontTools.misc.textToolsr   r   r   ZfontTools.misc.encodingToolsr   ZfontTools.ttLibr   ZfontTools.unicoder   Z r   r   r+   r   ZloggingZ	getLoggerrU   r0   r   r   Zobjectr1   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r_   r^   r   r   r   <module>r      s;   A A 4 * %  
    !_"\.. _"DB&6 B&J,:L ,:^ " "S:L S:l
  L^@L @D@:L @:Fi:< i:X
O) 
O
K) 
KB!\ B!J%, %R }}}}r   