+
    K<i!                    l   ^ RI HtHtHtHtH	t
Ht ^ RIHt ^ RIHtHt ^ RIHtHtHtHtHt ^ RIHt ^ RIHtHt ^RI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,H-t.H/t0H1t1 ^ R	I2H3t3H4t4 ^ R
I5H6t6 ^ RI7H8t8 ^ RI9t9^ RI:t:^ RI;H<t< ^ RI=t=]=P|                  ! ]?4      t@R tAR tB ! R R]C4      tD ! R R]D4      tE ! R R]E4      tF ! R R]E4      tG ! R R]G4      tH ! R R]G4      tI ! R R]I4      tJ ! R R]F]I4      tK ! R  R!]G4      tL ! R" R#]G4      tM ! R$ R%]G4      tN ! R& R']G4      tO ! R( R)]G4      tP ! R* R+]G4      tQ ! R, R-]Q]O4      tR ! R. R/]Q]M4      tS ! R0 R1]Q]I4      tT ! R2 R3]E4      tU ! R4 R5]E4      tV ! R6 R7]V4      tW ! R8 R9]M4      tX ! R: R;]M4      tY ! R< R=]E4      tZ ! R> R?]Z4      t[ ! R@ RA]Z4      t\ ! RB RC]\4      t] ! RD RE]\4      t^ ! RF RG]^4      t_ ! RH RI]_4      t` ! RJ RK]E4      ta ! RL RM]E4      tb ! RN RO]D4      tc ! RP RQ]c4      td ! RR RS]c4      te ! RT RU]e4      tf ! RV RW]e4      tg ! RX RY]c4      th ! RZ R[]e4      ti ! R\ R]]f]i4      tj ! R^ R_]e4      tk ! R` Ra]G4      tl ! Rb Rc]l4      tm ! Rd Re]D4      tn ! Rf Rg]D4      to ! Rh Ri]D4      tp ! Rj Rk]D4      tq ! Rl Rm]D4      tr ! Rn Ro]D4      ts ! Rp Rq]D4      tt ! Rr Rs]D4      tu ! Rt Ru]D4      tv ! Rv Rw4      tw ! Rx Ry]D4      tx ! Rz R{]M4      ty ! R| R}]O4      tz ! R~ R]z4      t- ! R R]z4      t// R]NbR]LbR]HbR]ObR]MbR]PbR]IbR]bbR]JbR]KbRK]abR3]UbR5]VbR7]WbR9]XbR?][bRC]]b/ RE]^bRG]_bRI]`bR]cbR]ebR]fbR]gbRc]mbRq]tbRs]ubRu]vbR{]ybR]-bR]/bR;]YbR]6! ]x]wR7      bR]6! ]x]%R7      bCRm]rRo]sR]dR]dR]dR]pReR RgR RkR RR RR RR /Ct{R# )    )fixedToFloatfloatToFixedfloatToFixedToStrstrToFixedToFloatensureVersionIsLongversionToFixed)TupleVariation)nearestMultipleShortestReprotRound)	bytesjointobytestostrpadsafeEval)LazyList)OPTIMIZE_FONT_SPEEDgetSearchRange)CountReferenceFormatSwitchingBaseTableOTTableReaderOTTableWriterValueRecordFactory)lookupTypesVarCompositeGlyphAATStateTableAATState	AATActionContextualMorphActionLigatureMorphActionInsertionMorphActionMorxSubtable
ExtendModeCompositeModeNO_VARIATION_INDEX)zip_longest
accumulate)partial)SimpleNamespaceN)Optionalc                 "    \        V \        4      # N)
isinstancetuple)ts   &E/usr/lib/python3/dist-packages/fontTools/ttLib/tables/otConverters.py<lambda>r0   -   s    Jq%(    c           	     r   . p/ pV  EF*  w  rErgpTp	VP                  R4      '       d   VR8X  g   Q h\        p
MVP                  R4      '       g   VR9   d   R\        R\        R\
        /V,          p
MqVR8X  d   \        p
McVR8X  d   \        p
MUVR8X  d   \        p
MGVR	8X  d   \        p
M9VR9   d   \        p
M+V\        9   g   R
V9  d
   Tp	\        p
M\        WA\        4      p
V
! WVWxR7      pVP                  '       d   VP                  pM*VR9   d   VP                  V4      pMVP                  V	4      pVP                  '       g   Wn        VR9   d_   VR,          Vn        VP                   P#                  4        F2  pVP#                  4        F  p\%        WVW~4      W>P&                  &   K  	  K4  	  VR	8X  dV   VR,          Vn        VR	,          Vn        VP(                  P#                  4        F  p\%        WVW~4      W>P&                  &   K  	  VP-                  V4       WS9  g   Q V4       hWV&   EK-  	  W#3# )zGiven a table spec from otData.py, build a converter object for each
field of the table. This is called for each table in otData.py, and
the results are assigned to the corresponding class in otTables.py.ValueFormatuint16Countuint8uint32SubTableExtSubTable	SubStructFeatureParams(descriptionr   featureParamTypes)StructLength	MorphType)CIDGlyphMappingGlyphCIDMapping)	MortChainMortSubtable	MorxChain)r8   r9   r:   )
startswithr3   endswithComputedUInt8ComputedUShortComputedULongr8   r9   r:   r;   StructWithLengthconverterMappingStructeval
tableClassgetr   valuesTable__name__r?   defaultFeatureParamsappend)	tableSpectableNamespace
convertersconvertersByNametpnamerepeatauxdescr	tableNameconverterClassconvrP   r.   clss   &&             r/   buildConvertersrd   0   s    J(1$&u	??=))>!>(N]]7##t/L'L.- 	N
 Z%N]"(N[ &N_$*N;;-N))cm	!'!%b:J!KdCC???J=='++B/J'++I6J(O;;-m<D%%,,.88:C5:45R$\\2 & / ?"%34G%HD"(6(GD%--44616tS1N . 7$+1T1+!%m )2n ''r1   c                      a  ] tR t^pt o RtRRR/R lltR tR tR tR	 t	RR
 lt
R tR t]P                  ! R4      tV 3R lR ltRtV tR# )BaseConverterzXBase class for converter objects. Apart from the constructor, this
is an abstract class.Nr>    c               b   Wn         W n        W0n        V P                  '       d/   V P                  '       g   \        V P                  R R4      V n        W@n        VP                  R4      ;'       g    VR9   V n        VP                  R4      ;'       g    VR8H  V n        VR9   V n        WPn	        R# )z<string>rO   r5   
LookupTyperA   N)DesignAxisRecordSizeValueRecordSize)
ClassCountClass2Count
FeatureTagSettingsCountVarRegionCountMappingCountRegionAxisCountDesignAxisCountrj   AxisValueCountrk   	AxisCountBaseGlyphRecordCountLayerRecordCountAxisIndicesList)
r\   r]   r^   compilerP   rH   isCountisLookupTypeisPropagatedr>   selfr\   r]   r^   rP   r>   s   &&&&&$r/   __init__BaseConverter.__init__t   s    	888DKKKtxxV<DH$}}W- 
 
 :
 2
 !MM,7NN4;;N  %
 
" 'r1   c                  a aaa	a
 SP                   ;'       d    V^8  pV'       d   S P                  S4      o
S
\        J d   RpV'       g9   . p\        V4       F%  pVP	                  S P                  SSV4      4       K'  	  V# VVV
V 3R lpV! 4       o	\        V	3R l\        V4       4       4      pSP                  VS
,          4       V# )z(Read an array of values from the reader.Fc                  X   <aa SP                  4       oSP                  oVVVVV3R  lp V # )c                 h   < SP                  SV S,          ,           4       SP                  SS/ 4      # r+   )seekread)ifontposreader_copy
recordSizer~   s   &r/   	read_itemABaseConverter.readArray.<locals>.get_read_item.<locals>.read_item   s-    $$S1z>%9:99[$;;r1   copyr   )r   r   r   r   readerr   r~   s    @@r/   get_read_item.BaseConverter.readArray.<locals>.get_read_item   s)    $kkmjj< < ! r1   c              3   (   <"   T F  pSx  K	  	  R # 5ir+    ).0r   r   s   & r/   	<genexpr>*BaseConverter.readArray.<locals>.<genexpr>   s     9LqLs   )lazygetRecordSizeNotImplementedrangerV   r   r   advance)r~   r   r   	tableDictcountr   lr   r   r   r   s   fff&&    @@r/   	readArrayBaseConverter.readArray   s    yy&&UQY++F3J^+A5\64;< "H! ! &I9E%L99ANN5:-.Hr1   c                J    \        V R 4      '       d   V P                  # \        # )
staticSize)hasattrr   r   r~   r   s   &&r/   r   BaseConverter.getRecordSize   s    4&&??"r1   c                    \        V 4      h)zRead a value from the reader.NotImplementedErrorr~   r   r   r   s   &&&&r/   r   BaseConverter.read       !$''r1   c                     \        V4       F  w  rVV P                  WW6V4       K  	  R #   \         d    pTP                  X3,           Tn        h R p?ii ; ir+   )	enumeratewrite	Exceptionargs)r~   writerr   r   rR   r   valuees   &&&&&   r/   
writeArrayBaseConverter.writeArray   sL    	%f-

61= . 	VVqd]AF	s   '+ AAAc                    \        V 4      h)zWrite a value to the writer.r   r~   r   r   r   r   repeatIndexs   &&&&&&r/   r   BaseConverter.write   r   r1   c                    \        V 4      h)zRead a value from XML.r   r~   attrscontentr   s   &&&&r/   xmlReadBaseConverter.xmlRead   r   r1   c                    \        V 4      h)zWrite a value to XML.r   r~   	xmlWriterr   r   r\   r   s   &&&&&&r/   xmlWriteBaseConverter.xmlWrite   r   r1   zVarIndexBase\s*\+\s*(\d+)c                0   < V ^8  d   QhRS[ S[,          /# )   return)r)   int)format__classdict__s   "r/   __annotate__BaseConverter.__annotate__   s      8C= r1   c                    V P                   P                  V P                  4      pV'       g   R# \        VP	                  ^4      4      # )zJIf description has `VarIndexBase + {offset}`, return the offset else None.N)varIndexBasePlusOffsetREsearchr>   r   group)r~   ms   & r/   getVarIndexOffsetBaseConverter.getVarIndexOffset   s6    ))001A1AB1771:r1   )r^   r>   rz   r{   r|   r\   r]   rP   r+   )rT   
__module____qualname____firstlineno____doc__r   r   r   r   r   r   r   r   rery   r   r   __static_attributes____classdictcell__r   s   @r/   rf   rf   p   sU     '" '><
((((  "zz*FG r1   rf   c                   L   a  ] tR t^t o ]R 4       t]R 4       tR tR tRt	V t
R# )SimpleValuec                    V # r+   r   r   s   &r/   toStringSimpleValue.toString       r1   c                    V # r+   r   r   s   &r/   
fromStringSimpleValue.fromString   r   r1   c                z    VP                  WER V P                  V4      3.,           4       VP                  4        R# r   N)	simpletagr   newliner   s   &&&&&&r/   r   SimpleValue.xmlWrite   s2    DGT]]55I+J*K"KLr1   c                2    V P                  VR ,          4      # r   )r   r   s   &&&&r/   r   SimpleValue.xmlRead   s    uW~..r1   r   N)rT   r   r   r   staticmethodr   r   r   r   r   r   r   s   @r/   r   r      s:        / /r1   r   c                   0   a  ] tR t^t o RtR tR tRtV tR# )OptionalValueNc                    W0P                   8w  d#   VP                  R V P                  V4      34       VP                  WE4       VP	                  4        R# r   )DEFAULTrV   r   r   r   r   s   &&&&&&r/   r   OptionalValue.xmlWrite   s@    LL LL'4==#789D(r1   c                X    R V9   d   V P                  VR ,          4      # V P                  # r   )r   r   r   s   &&&&r/   r   OptionalValue.xmlRead   s'    e??5>22||r1   r   )	rT   r   r   r   r   r   r   r   r   r   s   @r/   r   r      s     G r1   r   c                   0   a  ] tR t^t o ]R 4       tRtV tR# )IntValuec                    \        V ^ 4      # r   )r   r   s   &r/   r   IntValue.fromString   s    5!}r1   r   NrT   r   r   r   r   r   r   r   r   s   @r/   r   r      s      r1   r   c                   @   a  ] tR t^t o ^tR tR tRR ltR tRt	V t
R# )Longc                "    VP                  4       # r+   readLongr   s   &&&&r/   r   	Long.read        r1   c                $    VP                  V4      # r+   )readLongArrayr~   r   r   r   r   s   &&&&&r/   r   Long.readArray      ##E**r1   Nc                (    VP                  V4       R # r+   )	writeLongr   s   &&&&&&r/   r   
Long.write      r1   c                (    VP                  V4       R # r+   )writeLongArrayr~   r   r   r   rR   s   &&&&&r/   r   Long.writeArray
      f%r1   r   r+   rT   r   r   r   r   r   r   r   r   r   r   r   s   @r/   r   r      #     J!+ & &r1   r   c                   @   a  ] tR tRt o ^tR tR tRR ltR tRt	V t
R# )	ULongi  c                "    VP                  4       # r+   	readULongr   s   &&&&r/   r   
ULong.read      !!r1   c                $    VP                  V4      # r+   )readULongArrayr  s   &&&&&r/   r   ULong.readArray      $$U++r1   Nc                (    VP                  V4       R # r+   
writeULongr   s   &&&&&&r/   r   ULong.write      % r1   c                (    VP                  V4       R # r+   )writeULongArrayr  s   &&&&&r/   r   ULong.writeArray      v&r1   r   r+   r  r   s   @r/   r  r    #     J",!' 'r1   r  c                   0   a  ] tR tRt o ]R 4       tRtV tR# )Flags32i  c                    R V ,          # )z0x%08Xr   r   s   &r/   r   Flags32.toString      %r1   r   N)rT   r   r   r   r   r   r   r   r   s   @r/   r(  r(    s        r1   r(  c                       ] tR tRt]tRtR# )VarIndexi$  r   N)rT   r   r   r   r$   r   r   r   r1   r/   r-  r-  $  s     Gr1   r-  c                   @   a  ] tR tRt o ^tR tR tRR ltR tRt	V t
R# )	Shorti(  c                "    VP                  4       # r+   )	readShortr   s   &&&&r/   r   
Short.read+  r  r1   c                $    VP                  V4      # r+   )readShortArrayr  s   &&&&&r/   r   Short.readArray.  r  r1   Nc                (    VP                  V4       R # r+   )
writeShortr   s   &&&&&&r/   r   Short.write1  r!  r1   c                (    VP                  V4       R # r+   )writeShortArrayr  s   &&&&&r/   r   Short.writeArray4  r%  r1   r   r+   r  r   s   @r/   r/  r/  (  r&  r1   r/  c                   @   a  ] tR tRt o ^tR tR tRR ltR tRt	V t
R# )	UShorti8  c                "    VP                  4       # r+   
readUShortr   s   &&&&r/   r   UShort.read;        ""r1   c                $    VP                  V4      # r+   )readUShortArrayr  s   &&&&&r/   r   UShort.readArray>  s    %%e,,r1   Nc                (    VP                  V4       R # r+   writeUShortr   s   &&&&&&r/   r   UShort.writeA      5!r1   c                (    VP                  V4       R # r+   )writeUShortArrayr  s   &&&&&r/   r   UShort.writeArrayD  s    'r1   r   r+   r  r   s   @r/   r=  r=  8  s#     J#-"( (r1   r=  c                   @   a  ] tR tRt o ^tR tR tRR ltR tRt	V t
R# )	Int8iH  c                "    VP                  4       # r+   )readInt8r   s   &&&&r/   r   	Int8.readK  r  r1   c                $    VP                  V4      # r+   )readInt8Arrayr  s   &&&&&r/   r   Int8.readArrayN  r  r1   Nc                (    VP                  V4       R # r+   )	writeInt8r   s   &&&&&&r/   r   
Int8.writeQ  r
  r1   c                (    VP                  V4       R # r+   )writeInt8Arrayr  s   &&&&&r/   r   Int8.writeArrayT  r  r1   r   r+   r  r   s   @r/   rO  rO  H  r  r1   rO  c                   @   a  ] tR tRt o ^tR tR tRR ltR tRt	V t
R# )	UInt8iX  c                "    VP                  4       # r+   )	readUInt8r   s   &&&&r/   r   
UInt8.read[  r  r1   c                $    VP                  V4      # r+   )readUInt8Arrayr  s   &&&&&r/   r   UInt8.readArray^  r  r1   Nc                (    VP                  V4       R # r+   )
writeUInt8r   s   &&&&&&r/   r   UInt8.writea  r!  r1   c                (    VP                  V4       R # r+   )writeUInt8Arrayr  s   &&&&&r/   r   UInt8.writeArrayd  r%  r1   r   r+   r  r   s   @r/   r]  r]  X  r&  r1   r]  c                   4   a  ] tR tRt o ^tR tRR ltRtV tR# )UInt24ih  c                "    VP                  4       # r+   
readUInt24r   s   &&&&r/   r   UInt24.readk  rB  r1   Nc                (    VP                  V4       R # r+   writeUInt24r   s   &&&&&&r/   r   UInt24.writen  rJ  r1   r   r+   	rT   r   r   r   r   r   r   r   r   r   s   @r/   rk  rk  h  s     J#" "r1   rk  c                   &   a  ] tR tRt o R tRtV tR# )ComputedIntir  c                b    Ve+   VP                  V: RV: 24       VP                  4        R # R # )N=)commentr   r   s   &&&&&&r/   r   ComputedInt.xmlWrites  s,    u56 r1   r   NrT   r   r   r   r   r   r   r   s   @r/   rv  rv  r  s        r1   rv  c                       ] tR tRtRtR# )rI   iy  r   NrT   r   r   r   r   r   r1   r/   rI   rI   y      r1   rI   c                       ] tR tRtRtR# )rJ   i}  r   Nr}  r   r1   r/   rJ   rJ   }  r~  r1   rJ   c                       ] tR tRtRtR# )rK   i  r   Nr}  r   r1   r/   rK   rK     r~  r1   rK   c                   4   a  ] tR tRt o ^tR tRR ltRtV tR# )Tagi  c                "    VP                  4       # r+   )readTagr   s   &&&&r/   r   Tag.read  s    ~~r1   Nc                (    VP                  V4       R # r+   )writeTagr   s   &&&&&&r/   r   	Tag.write  s    r1   r   r+   rt  r   s   @r/   r  r    s     J  r1   r  c                   D   a  ] tR tRt o ^tRtR tR tR tR	R lt	Rt
V tR# )
GlyphIDi  Hc                n    VP                  VP                  V P                  V P                  V4      4      # r+   )getGlyphNameManyr   typecoder   r  s   &&&&&r/   r   GlyphID.readArray  s/    $$T]]DOOUC
 	
r1   c                l    VP                  VP                  V P                  V P                  4      4      # r+   )getGlyphName	readValuer  r   r   s   &&&&r/   r   GlyphID.read  s(      !1!1$--!QRRr1   c                \    VP                  V P                  VP                  V4      4       R # r+   )r   r  getGlyphIDManyr  s   &&&&&r/   r   GlyphID.writeArray  s!    $--)<)<V)DEr1   Nc                \    VP                  V P                  VP                  V4      4       R # r+   )
writeValuer  
getGlyphIDr   s   &&&&&&r/   r   GlyphID.write  s    $--)?@r1   r   r+   )rT   r   r   r   r   r  r   r   r   r   r   r   r   s   @r/   r  r    s,     JH

SFA Ar1   r  c                       ] tR tRt^tRtRtR# )	GlyphID32i  Lr   N)rT   r   r   r   r   r  r   r   r1   r/   r  r    s    JHr1   r  c                   &   a  ] tR tRt o R tRtV tR# )NameIDi  c                   VP                  WER V3.,           4       V'       d   V'       d   VP                  R4      pV'       dj   VP                  V4      pVP                  R4       V'       d   VP	                  V4       M-VP	                  R4       \
        P                  RV,          4       VP                  4        R# )r   r\     zmissing from name tablez"name id %d missing from name tableN)r   rQ   getDebugNamer   ry  logwarningr   )r~   r   r   r   r\   r   	nameTables   &&&&&& r/   r   NameID.xmlWrite  s    DGU+;*<"<=E(I --e4%%%d+%%&?@KK Du LMr1   r   Nr{  r   s   @r/   r  r    s      r1   r  c                   &   a  ] tR tRt o R tRtV tR# )	STATFlagsi  c                R   VP                  WER V3.,           4       . pV^,          '       d   VP                  R4       V^,          '       d   VP                  R4       V'       d2   VP                  R4       VP                  RP	                  V4      4       VP                  4        R# )r   OlderSiblingFontAttributeElidableAxisValueNamer   N)r   rV   r   ry  joinr   r~   r   r   r   r\   r   flagss   &&&&&& r/   r   STATFlags.xmlWrite  s    DGU+;*<"<=4<<LL454<<LL01OOD!chhuo.r1   r   Nr{  r   s   @r/   r  r    s     
 
r1   r  c                   0   a  ] tR tRt o ]R 4       tRtV tR# )
FloatValuei  c                    \        V 4      # r+   )floatr   s   &r/   r   FloatValue.fromString      U|r1   r   Nr   r   s   @r/   r  r    s      r1   r  c                   4   a  ] tR tRt o ^tR tRR ltRtV tR# )
DeciPointsi  c                0    VP                  4       ^
,          # )
   r?  r   s   &&&&r/   r   DeciPoints.read  s      "R''r1   Nc                H    VP                  \        V^
,          4      4       R# )r  N)rH  roundr   s   &&&&&&r/   r   DeciPoints.write  s    5,-r1   r   r+   rt  r   s   @r/   r  r    s     J(. .r1   r  c                      a  ] tR tRt o ]t]t]t]tR t	R
R lt
]R 4       t]R 4       t]R 4       t]R 4       tR	tV tR# )BaseFixedValuei  c                T    V P                  \        WP                  4      ! 4       4      # r+   )fromIntgetattrreaderMethodr   s   &&&&r/   r   BaseFixedValue.read  s    ||GF,=,=>@AAr1   Nc                Z    \        WP                  4      ! V P                  V4      4       R # r+   )r  writerMethodtoIntr   s   &&&&&&r/   r   BaseFixedValue.write  s    ))*4::e+<=r1   c                ,    \        WP                  4      # r+   )fi2flprecisionBitsrc   r   s   &&r/   r  BaseFixedValue.fromInt      U--..r1   c                ,    \        WP                  4      # r+   )fl2fir  r  s   &&r/   r  BaseFixedValue.toInt  r  r1   c                ,    \        WP                  4      # r+   )str2flr  r  s   &&r/   r   BaseFixedValue.fromString      e..//r1   c                ,    \        WP                  4      # r+   )fl2strr  r  s   &&r/   r   BaseFixedValue.toString  r  r1   r   r+   )rT   r   r   r   r   r   r  r  r  r   r   classmethodr  r  r   r   r   r   r   s   @r/   r  r    st     J"M!L!LB> / / / / 0 0 0 0r1   r  c                   &    ] tR tRt^t^tRtRtRtR# )Fixedi  r   r  r   N	rT   r   r   r   r   r  r  r  r   r   r1   r/   r  r    s    JMLLr1   r  c                   &    ] tR tRt^t^tRtRtRtR# )F2Dot14i  r1  r7  r   Nr  r   r1   r/   r  r    s    JMLLr1   r  c                   z   a a ] tR tRt oRtRt]V 3R l4       t]V 3R l4       t]R 4       t	]R 4       t
RtVtV ;t# )	Anglei   g        c                R   < \         SV `  V4      V P                  ,           ^,          #    )superr  biasrc   r   	__class__s   &&r/   r  Angle.fromInt  s     &1S88r1   c                R   < \         SV `  V^,          V P                  ,
          4      # r  )r  r  r  r  s   &&r/   r  Angle.toInt
  s    w}eckSXX566r1   c                n    \        \        V4      V P                  ,          4      V P                  ,          # r+   )r   r  factorr  s   &&r/   r   Angle.fromString  s%     uU|cjj01CJJ>>r1   c                ,    \        WP                  4      # r+   )r
   r  r  s   &&r/   r   Angle.toString  s    *5**==r1   r   g     ?)rT   r   r   r   r  r  r  r  r  r   r   r   r   __classcell__r  r   s   @@r/   r  r     sd      D"F9 9 7 7 ? ? > > >r1   r  c                       ] tR tRtRtRtR# )BiasedAnglei  g      ?r   N)rT   r   r   r   r  r   r   r1   r/   r  r    s	     Dr1   r  c                   d   a  ] tR tRt o ^tR tR	R lt]R 4       t]R 4       t	]R 4       t
RtV tR# )
Versioni  c                &    VP                  4       pV# r+   r   )r~   r   r   r   r   s   &&&& r/   r   Version.read!  s    !r1   Nc                >    \        V4      pVP                  V4       R # r+   )fi2ver  r   s   &&&&&&r/   r   Version.write%  s    er1   c                    \        V 4      # r+   )ve2fir   s   &r/   r   Version.fromString)  r  r1   c                    R V ,          # )0x%08xr   r   s   &r/   r   Version.toString-  r+  r1   c                    \        V ^4      # )   )r  )vs   &r/   	fromFloatVersion.fromFloat1  s    Q|r1   r   r+   )rT   r   r   r   r   r   r   r   r   r   r  r   r   r   s   @r/   r  r    sP     J         r1   r  c                   8   a  ] tR tRt o Rt^@tR tRR ltRtV t	R# )Char64i6  zAn ASCII string with up to 64 characters.

Unused character positions are filled with 0x00 bytes.
Used in Apple AAT fonts in the `gcid` table.
c                    VP                  V P                  4      pVP                  R 4      pV^ 8  d   VRV p\        VRRR7      pV\        VRRR7      8w  d   \        P                  RV,          4       V# )    Nasciireplaceencodingerrorsignorez%replaced non-ASCII characters in "%s")readDatar   findr   r  r  )r~   r   r   r   datazeroPosss   &&&&   r/   r   Char64.read?  sj    t/))E"a<>D$;dWX>>KK?!CDr1   Nc                r   \        VR RR7      pV\        VR RR7      8w  d   \        P                  RV,          4       \        V4      V P                  8  d(   \        P                  RW@P                  3,          4       VRV P                  ,          ,           RV P                   pVP                  V4       R# )r  r  r  r  z&replacing non-ASCII characters in "%s"z$truncating overlong "%s" to %d bytesr
  N)r   r  r  lenr   	writeData)r~   r   r   r   r   r   r  s   &&&&&& r/   r   Char64.writeI  s    uwyA7578DDKK@5HIt9t&KK6%9QQ ut..0A$//Br1   r   r+   )
rT   r   r   r   r   r   r   r   r   r   r   s   @r/   r  r  6  s       J	 	r1   r  c                   H   a  ] tR tRt o R tR tR
R ltR tR tR t	R	t
V tR# )rN   iU  c                `    V P                   ;'       d    V P                   P                  V4      # r+   )rP   r   r   s   &&r/   r   Struct.getRecordSizeV  s#    HH4??#@#@#HHr1   c                H    V P                  4       pVP                  W4       V# r+   )rP   	decompile)r~   r   r   r   tables   &&&& r/   r   Struct.readY  s    !%r1   Nc                (    VP                  W4       R # r+   )ry   r   s   &&&&&&r/   r   Struct.write^  s    f#r1   c                    Vf6   V'       d,   VP                  WER.,           4       VP                  4        R # R # VP                  WWTR7       R # )N)r\   )empty   )r   r   toXMLr   s   &&&&&&r/   r   Struct.xmlWritea  s@    = ##D<.*@A!!#KK	K:r1   c                   R V9   d   \        VR ,          4      '       d   R# V P                  4       pVP                  R4      pVe   \        V4      Vn        \        VR4      '       * pV'       d   RpVP                  4        F  pVP                  '       g   K  Rp\        VR4      '       g   / Vn        VP                  p	VP                  V	9  g   Q VP                  V	34       h\        WHP                  R4       \        VP                  VP                  4      WP                  &   K  	  V F2  p
\        V
\        4      '       d   V
w  rpVP                  WW#4       K2  K4  	  VP!                  \#        VRR4      R7       V'       dX   X'       dP   VP                  4        F;  pVP                  '       g   K  VP                  p	WP                   V	'       d   K9  V=K=  	  V# )r%  NFormatpostReadFT_propagator)
propagator)r   rP   rQ   r   r*  r   getConvertersr|   r,  r\   setattrr   __dict__r,   r-   fromXMLpopulateDefaultsr  )r~   r   r   r   r   r*  
noPostReadcleanPropagationrb   r-  elementr\   s   &&&&        r/   r   Struct.xmlReadn  s   ew 8 8!8$v;EL 
33
$++-$$$'+$"477+-(!%!1!1J99J6OJ8OO6E99d3,:5>>499,UJyy) . G'5))'.$Wd79  	'$t*LM!//1D(((%)%5%5
&yy1)z $ 0 2 r1   c                :    R \        V P                  4      ,           # )z
Struct of )reprrP   )r~   s   &r/   __repr__Struct.__repr__  s    d4??333r1   r   r+   )rT   r   r   r   r   r   r   r   r   r9  r   r   r   s   @r/   rN   rN   U  s*     I
$;(T4 4r1   rN   c                   0   a  ] tR tRt o R tRR ltRtV tR# )rL   i  c                    VP                   pV P                  4       pVP                  W4       VP                  WEP                  ,           4       V# r+   )r   rP   r  r   r@   )r~   r   r   r   r   r   s   &&&&  r/   r   StructWithLength.read  s=    jj!%C,,,-r1   Nc                `   \        VP                  4       4       F  w  rgVP                  R 8X  g   K   M	  \        VP                  4      X,           p\        V\        4      '       d
   V^,          p^^^R^R/XP                  ,          p	VP                  4       p
Wn	        VP                  W4       VP                  4       V
,
          pVP                  4       pVP                  WW;4       VP                  V,          RRVP                   8X  g   Q hVP                  4       VP                  V&   R# )r@   i     >[=    ޭN)r   r.  r\   r  itemsr,   r   r   getDataLengthr@   ry   getSubWriterr   
getAllData)r~   r   r   r   r   r   	convIndexrb   lengthIndexdeadbeefbeforelengthlengthWriters   &&&&&&       r/   r   StructWithLength.write  s    ()<)<)>?OIyyN*  @ &,,')3e5661KtQ:6tG%%'%f#%%'&0**,

<y9||K(,?@Q$//,RRRR$0$;$;$=[!r1   r   r+   rT   r   r   r   r   r   r   r   r   s   @r/   rL   rL     s     > >r1   rL   c                   @   a  ] tR tRt o ^tR tR tR tRR ltRt	V t
R# )	rS   i  c                "    VP                  4       # r+   r?  r   s   &&r/   
readOffsetTable.readOffset  rB  r1   c                (    VP                  ^ 4       R# r   NrG  r~   r   s   &&r/   writeNullOffsetTable.writeNullOffset      1r1   c                    V P                  V4      pV^ 8X  d   R# V P                  4       pVP                  V4      pVP                  '       d   Wn        W%n        V# VP                  W4       V# rR  )rO  rP   getSubReaderr   r   r   r  )r~   r   r   r   offsetr   s   &&&&  r/   r   
Table.read  sc    (Q;!$$V,999!LJ  OOF)r1   Nc                    Vf   V P                  V4       R # VP                  4       pV P                  Vn        Ve   WVn        VP	                  W`P
                  R7       VP                  Wb4       R # )N
offsetSize)rT  rC  r\   r   writeSubTabler   ry   )r~   r   r   r   r   r   	subWriters   &&&&&& r/   r   Table.write  s[    =  (++-I!YYIN&(3%   GMM)*r1   r   r+   )rT   r   r   r   r   rO  rT  r   r   r   r   r   s   @r/   rS   rS     s#     J#	+ 	+r1   rS   c                   0   a  ] tR tRt o ^tR tR tRtV tR# )LTablei  c                "    VP                  4       # r+   r  r   s   &&r/   rO  LTable.readOffset  r  r1   c                (    VP                  ^ 4       R# rR  r  rS  s   &&r/   rT  LTable.writeNullOffset  s    !r1   r   N	rT   r   r   r   r   rO  rT  r   r   r   s   @r/   rb  rb    s     J" r1   rb  c                   0   a  ] tR tRt o ^tR tR tRtV tR# )Table24i  c                "    VP                  4       # r+   rm  r   s   &&r/   rO  Table24.readOffset  rB  r1   c                (    VP                  ^ 4       R# rR  rq  rS  s   &&r/   rT  Table24.writeNullOffset  rV  r1   r   Nrg  r   s   @r/   ri  ri    s     J# r1   ri  c                   8   a a ] tR tRt oR tV 3R ltRtVtV ;t# )r:   i  c                    V P                   V,          V,          pV P                  V P                  V P                  V P                  V4      # r+   r   r  r\   r]   r^   r~   	tableType
lookupTyperP   s   &&& r/   getConverterSubStruct.getConverter  8    %%i0<
~~diidhh
KKr1   c                4   < \         \        V `  WVR V4       R # r+   )r  r:   r   r~   r   r   r   r\   r   r  s   &&&&&&r/   r   SubStruct.xmlWrite  s    i'	eLr1   r   	rT   r   r   r   rt  r   r   r   r  r  s   @@r/   r:   r:     s     LM Mr1   r:   c                   8   a a ] tR tRt oR tV 3R ltRtVtV ;t# )r8   i  c                    V P                   V,          V,          pV P                  V P                  V P                  V P                  V4      # r+   rp  rq  s   &&& r/   rt  SubTable.getConverter  rv  r1   c                4   < \         \        V `  WVR V4       R # r+   )r  r8   r   rx  s   &&&&&&r/   r   SubTable.xmlWrite  s    h&ytUKr1   r   rz  r  s   @@r/   r8   r8     s     LL Lr1   r8   c                   *   a  ] tR tRt o RR ltRtV tR# )r9   i  Nc                B    R Vn         \        P                  WW#WE4       R# )TN)	ExtensionrS   r   r   s   &&&&&&r/   r   ExtSubTable.write  s    D$5Fr1   r   r+   )rT   r   r   r   r   r   r   r   s   @r/   r9   r9     s     G Gr1   r9   c                   &   a  ] tR tRt o R tRtV tR# )r;   i	  c                    V P                   P                  WP                  4      pV P                  V P                  V P
                  V P                  V4      # r+   )r?   rQ   rU   r  r\   r]   r^   )r~   
featureTagrP   s   && r/   rt  FeatureParams.getConverter
  s?    ++//
<U<UV
~~diidhh
KKr1   r   N)rT   r   r   r   rt  r   r   r   s   @r/   r;   r;   	  s     L Lr1   r;   c                   F   a  ] tR tRt o ^tR	RR/R lltR tR	R ltRtV t	R# )
r3   i  Nr>   rg   c          	     r    \         P                  WW#WER 7       RVR,          R8X  d   RMR,           V n        R# )r=   r3   21N)rf   r   whichr}   s   &&&&&$r/   r   ValueFormat.__init__  s6    Z 	 	
 #T"X_c#F
r1   c                T    VP                  4       p\        V4      WP                  &   V# r+   )r@  r   r  r~   r   r   r   r   s   &&&& r/   r   ValueFormat.read  s&    ""$/7zzr1   c                V    VP                  V4       \        V4      WP                  &   R # r+   )rH  r   r  )r~   r   r   r   r   r   s   &&&&&&r/   r   ValueFormat.write  s!    6"/7zzr1   )r  r+   )
rT   r   r   r   r   r   r   r   r   r   r   s   @r/   r3   r3     s'     JG" G
8 8r1   r3   c                   B   a  ] tR tRt o R tR tR	R ltR tR tRt	V t
R# )
ValueRecordi"  c                F    ^\        WP                  ,          4      ,          # r   )r  r  r   s   &&r/   r   ValueRecord.getRecordSize#  s    3vjj)***r1   c                D    WP                   ,          P                  W4      # r+   )r  readValueRecordr   s   &&&&r/   r   ValueRecord.read&  s    jj!11&??r1   Nc                J    WP                   ,          P                  WV4       R # r+   )r  writeValueRecordr   s   &&&&&&r/   r   ValueRecord.write)  s    zz++F%@r1   c                L    Vf   R # VP                  WV P                  V4       R # r+   )r'  r\   r   s   &&&&&&r/   r   ValueRecord.xmlWrite,  s    =KK	E:r1   c                F    ^RI Hp V! 4       pVP                  RWV4       V# )r&  )r  N)otBaser  r1  )r~   r   r   r   r  r   s   &&&&  r/   r   ValueRecord.xmlRead2  s!    'dED1r1   r   r+   )rT   r   r   r   r   r   r   r   r   r   r   r   s   @r/   r  r  "  s%     +@A; r1   r  c                      a  ] tR tRt o ^
tRR/R ltR tRR lt]R 4       t	R	 t
R
 tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )	AATLookupi:  r>   rg   c          	         \         P                  WW#WER 7       \        V P                  \        4      '       d   V P                  RRRR7      V n        R# \        RRRV P                  R7      V n        R# )r=   ValueN)r\   r]   r^   )r\   r]   r^   rP   )rf   r   
issubclassrP   r   	converterrS   r}   s   &&&&&$r/   r   AATLookup.__init__=  s^    Z 	 	
 doo{33!__'$D_QDN"TtDNr1   c                .   VP                  4       pV^ 8X  d   V P                  W4      # V^8X  d   V P                  W4      # V^8X  d   V P                  W4      # V^8X  d   V P	                  W4      # V^8X  d   V P                  W4      # Q RT,          4       h)r   zunsupported lookup format: %d)r@  readFormat0readFormat2readFormat4readFormat6readFormat8r  s   &&&& r/   r   AATLookup.readH  s    ""$Q;##F11q[##F11q[##F11q[##F11q[##F11B9FBB5r1   Nc                   \        \        VP                  4        UUu. uF  w  rgVP                  V4      V3NK  	  upp4      4      p\        \        \	        R V P                  WV4      V P                  WV4      V P                  WV4      V P                  WV4      .4      4      4      p	V	^ ,          w  rpVP                  4       pV! 4        VP                  4       V,
          pW8X  g   Q RVV
V3,          4       hR # u uppi )Nz;AATLookup format %d claimed to write %d bytes, but wrote %d)
listsortedrA  r  filterbuildFormat0buildFormat2buildFormat6buildFormat8rB  )r~   r   r   r   r   r   glyphvalrR   formatsdataSizelookupFormatwriteMethodr   
actualSizes   &&&&&&         r/   r   AATLookup.writeW  s   EKKMRMjeT__U+S1MRS
 ))&?))&?))&?))&?	

 /6aj+""$))+c1
"	
HL
 
	
"/ Ss   C=c                    V P                  V4       V P                  V4       \        WR 7      w  r4pV P                  V4       V P                  V4       V P                  V4       R# ))nitemSizeN)rH  r   )r   numUnitsunitSizesearchRangeentrySelector
rangeShifts   &&&   r/   writeBinSearchHeaderAATLookup.writeBinSearchHeaderw  s\    8$8$1?2
.J 	;'=):&r1   c                   a aaa \        SP                  4       4      p\        S4      V8w  d   R # S P                  P                  p^WE,          ,           ^ VV VV3R l3# )Nc                  *   < SP                  SS S4      # r+   )writeFormat0r   r~   rR   r   s   r/   r0   (AATLookup.buildFormat0.<locals>.<lambda>      D%%fdF;r1   )r  getGlyphOrderr  r   )r~   r   r   rR   	numGlyphs	valueSizes   ffff  r/   r  AATLookup.buildFormat0  sO    **,-	v;)#NN--		%%;
 	
r1   c           	     |    VP                  ^ 4       V F$  w  rEV P                  P                  WRVRR7       K&  	  R# r   Nr   r   r   )rH  r  r   )r~   r   r   rR   glyphID_r   s   &&&&  r/   r  AATLookup.writeFormat0  s<    1%OHNN  Et !   &r1   c                  a aaa V^ ,          w  rETp. oVR,           F4  w  rxWv^,           8w  g   W8w  d   SP                  WFV34       T;rFTpK2  TpK6  	  SP                  WFV34       S P                  P                  p	\        S4      ^,           V	^,           r^S P                  ,           W,          ,           ^VVV V3R l3# )r   :r&  NNc                  *   < SP                  SS S4      # r+   )writeFormat2)r   segmentsr~   r   s   r/   r0   (AATLookup.buildFormat2.<locals>.<lambda>  s    D%%fdH=r1   )rV   r  r   r  BIN_SEARCH_HEADER_SIZE)r~   r   r   rR   segStartsegValuesegEndglyphIDcurValuer  r  r  r  s   fff&        @r/   r  AATLookup.buildFormat2  s    #AY!'G1*$(<8 <=$++#  ", 	845NN--	 ]Q.	A(+++h.AA=
 	
r1   c           	        VP                  ^4       V P                  P                  p\        V4      V^,           reV P	                  WV4       V FG  w  rxp	VP                  V4       VP                  V4       V P                  P                  WRV	RR7       KI  	  VP                  R4       VP                  R4       VP                  RV,          4       R# )r   Nr    r
  rH  r  r   r  r  r   r  )
r~   r   r   r  r  r  r  
firstGlyph	lastGlyphr   s
   &&&&      r/   r  AATLookup.writeFormat2  s    1NN--	 ]IM(!!&H=,4(J5y)z*NN  Et !  -5 	6"6"9,-r1   c                   a aaa S P                   P                  p\        S4      V^,           re^S P                  ,           V^,           V,          ,           ^VV VV3R l3# )r   c                  *   < SP                  SS S4      # r+   )writeFormat6r  s   r/   r0   (AATLookup.buildFormat6.<locals>.<lambda>  r  r1   )r  r   r  r  )r~   r   r   rR   r  r  r  s   ffff   r/   r  AATLookup.buildFormat6  sM    NN--	 [)a-(+++x!|x.GG;
 	
r1   c           	     f   VP                  ^4       V P                  P                  p\        V4      V^,           reV P	                  WV4       V F5  w  rxVP                  V4       V P                  P                  WRVRR7       K7  	  VP                  R4       VP                  RV,          4       R# )   Nr  r  r
  r  )	r~   r   r   rR   r  r  r  r  r   s	   &&&&     r/   r  AATLookup.writeFormat6  s    1NN--	 [)a-(!!&H=$NGw'NN  Et !  %
 	6"9,-r1   c                   a aaa S^ ,          ^ ,          SR,          ^ ,          rT\        S4      WT,
          ^,           8w  d   R# S P                  P                  p^\        S4      V,          ,           ^VV VV3R l3# )r   Nc                  *   < SP                  SS S4      # r+   )writeFormat8r  s   r/   r0   (AATLookup.buildFormat8.<locals>.<lambda>  r  r1   r  )r  r  r   )r~   r   r   rR   
minGlyphID
maxGlyphIDr  s   ffff   r/   r  AATLookup.buildFormat8  sa    !'1vbz!}Jv;*1A55NN--	Fi'';
 	
r1   c           	         V^ ,          ^ ,          pVP                  ^4       VP                  V4       VP                  \        V4      4       V F$  w  rVV P                  P                  WRVRR7       K&  	  R# r  )rH  r  r  r   )r~   r   r   rR   firstGlyphID_r   s   &&&&   r/   r  AATLookup.writeFormat8  si    ay|1<(3v;'HANN  Et !  r1   c                    \        VP                  4       4      pV P                  P                  WR VR7      p\	        V4       UUu/ uF  w  rVVP                  V4      VbK  	  upp# u uppi Nr   r   )r  r  r  r   r   r  )r~   r   r   r  r  kr   s   &&&    r/   r  AATLookup.readFormat0  s^    **,-	~~''I'V<EdOLO!!!$e+OLLLs   A'c                   / pVP                   ^,
          pVP                  4       VP                  4       reV^V P                  P                  ,           8  g   Q V4       h\	        V4       F  pVP                  WGV,          ,           ^,           4       VP                  4       pVP                  4       p	V P                  P                  WRR7      p
VR8w  g   Kn  \	        W^,           4       F  pWVP                  V4      &   K  	  K  	  V# r   N)r   r  r   r@  r  r   r   r   r   r  )r~   r   r   mappingr   r  r  r   lastfirstr   r  s   &&&         r/   r  AATLookup.readFormat2  s    jj1n#..0&2C2C2E(1t~~8888B(B8xAKK(l*R/0$$&D%%'ENN'''EEv~uQh/A49D--a01 0 ! r1   c                h   / pVP                   ^,
          pVP                  4       pV^8  g   Q V4       h\        VP                  4       4       F  pVP                  WFV,          ,           ^,           4       VP                  4       pVP                  4       pVP                  4       p	VR8w  g   Ka  VP	                  ^ 4      p
V
P                  WI,           4       V P
                  P                  WRWx,
          ^,           R7      p\        V4       F  w  rWVP                  W,           4      &   K   	  K  	  V# )r   r  Nr  )	r   r@  r   r   rX  r  r   r   r  )r~   r   r   r  r   r  r   r	  r
  rY  
dataReaderr  r  r  s   &&&           r/   r  AATLookup.readFormat4  s   jj1n$$&1}&h&}v((*+AKK(l*R/0$$&D%%'E&&(Fv~#003
-~~//DL1<L 0  &dODA<=D--ei89 , , r1   c                   / pVP                   ^,
          pVP                  4       pV^V P                  P                  ,           8  g   Q V4       h\	        VP                  4       4       Fq  pVP                  WFV,          ,           ^,           4       VP                  4       pV P                  P                  WRR7      pVR8w  g   K^  WVP                  V4      &   Ks  	  V# r  r  )	r~   r   r   r  r   r  r   r  r   s	   &&&      r/   r  AATLookup.readFormat6
  s    jj1n$$&1t~~8888B(B8v((*+AKK(l*R/0'')GNN'''EE& 6;))'23 , r1   c                    VP                  4       pVP                  4       pV P                  P                  WR VR7      p\        V4       UUu/ uF  w  rgVP	                  W6,           4      VbK  	  upp# u uppi r  )r@  r  r   r   r  )r~   r   r   r
  r   r  r  r   s   &&&     r/   r  AATLookup.readFormat8  sj    !!#!!#~~''E'RFOPToVo
!!%),e3oVVVs   #A4c                    / pV FN  p\        V\        4      '       g   K  Vw  rgpVR 8X  g   K)  V P                  P                  WxV4      WGR,          &   KP  	  V# )Lookupr  )r,   r-   r  r   )	r~   r   r   r   r   r5  r\   a
eltContents	   &&&&     r/   r   AATLookup.xmlRead  sT    G'5))&-#8#(,(>(>qd(SEG*%	 
 r1   c           	        VP                  WE4       VP                  4        \        VP                  4       4       F'  w  rcV P                  P                  WVR RV3.R7       K)  	  VP                  V4       VP                  4        R# )r  r  )r   r\   r   N)begintagr   r  rA  r  r   endtag)r~   r   r   r   r\   r   r  s   &&&&&& r/   r   AATLookup.xmlWrite&  sw    4'"5;;=1LENN##u8WeDTCU $  2 	r1   )r  r+   )rT   r   r   r   r  r   r   r   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r   r   r   s   @r/   r  r  :  s     	R 	C
@ ' '	

(.
.	
M
(W r1   r  c                   <   a  ] tR tRt o R tRR ltR tR tRtV t	R# )	AATLookupWithDataOffseti8  c                ^   VP                  4       pVP                  4       pVP                  V4      p\        R RR\        4      pVP	                  WbV4      p/ p	VP                  4        FA  w  rVP                  W,           4      pV P                  4       pVP                  W4       WV
&   KC  	  V	# DataOffsetsN)r  rX  r  r=  r   rA  rP   r  )r~   r   r   r   lookupOffset
dataOffsetlookupReaderlookupoffsetsresultr  rY  r  items   &&&&          r/   r   AATLookupWithDataOffset.read9  s    '')%%'
**<8=$f=++l)<$]]_ME,,V-@AJ??$DNN:, 5M	 -
 r1   Nc                F   / / ^ rp. p	\        WBP                  R7       Fz  p
\        4       pWJ,          P                  W4       VP	                  4       pVP                  VR4      pVR8X  d*   TpV\        V4      ,           pWV&   V	P                  V4       WV
&   K|  	  VP                  4       p\        RRR\        4      pVP                  WW6R4       VP                  4       pVP                  V^R7       VP                  V^R7       V	 F  pVP                  V4       K  	  R# )r   )keyNr   r\  )r  r  r   ry   rD  rQ   r  rV   rC  r  r=  r   r^  r  )r~   r   r   r   r   r   offsetByGlyphoffsetByDatadataLencompiledDatar  r_  r  rY  lookupWriterr$  
dataWriterds   &&&&&&            r/   r   AATLookupWithDataOffset.writeG  s    022qWE7E%IL  1'')D!%%dD1F~ !CI-%+T"##D)#)%  8 **,=$f=\4H((*
\a8ZA6A  # r1   c                V    \        R RRV P                  4      pVP                  WV4      # r  )r  rP   r   )r~   r   r   r   r$  s   &&&& r/   r   AATLookupWithDataOffset.xmlReadj  s'    =$dooF~~ed33r1   c                \    \        R RRV P                  4      pVP                  WW4V4       R# r  )r  rP   r   )r~   r   r   r   r\   r   r$  s   &&&&&& r/   r    AATLookupWithDataOffset.xmlWriten  s&    =$dooF	e<r1   r   r+   
rT   r   r   r   r   r   r   r   r   r   r   s   @r/   r  r  8  s     !$F4= =r1   r  c                      a ] tR tRt oRRRRRRRR/t]P                  4        U Uu/ uF  w  rWbK	  	  upp tRRR/R	 lltR
 tR t	R t
R tRR ltRtVtR# u upp i )MorxSubtableConverteris  LayoutOrderReversedLayoutOrderLogicalOrderReversedLogicalOrderNr>   rg   c          	     6    \         P                  WW#WER 7       R# r=   N)rf   r   r}   s   &&&&&$r/   r   MorxSubtableConverter.__init__~  s    Z 	 	
r1   c                p    V^ ,          ^ 8w  d
   RVn         R# V^,          ^ 8w  d
   RVn         R# RVn         R# )    AnyVertical
HorizontalN)TextDirection)r~   r  subtables   &&&r/   "_setTextDirectionFromCoverageFlags8MorxSubtableConverter._setTextDirectionFromCoverageFlags  s2    DLQ%*H"dlq %/H"%1H"r1   c                   VP                   p\        4       pVP                  4       Vn        VP	                  4       pV^@,          ^ 8g  V^,          ^ 8g  3pV P
                  V,          Vn        V P                  We4       VP                  4       Vn	        V;P                  V^,          ^,          ,          un	        VP	                  4       Vn
        VP                  4       Vn        \        R,          P                  VP                  4      pVf   Q RTP                  ,          4       hVP                   V,
          p	VP                  VP                   VP                   VP                  ,           V	,
           p
\        V
4      VP                  V	,
          8X  g   Q h\!        WP"                  R7      pV! 4       Vn        VP$                  P'                  W4       VP)                  WEP                  ,           4       V# )@   morxz!unsupported 'morx' lookup type %s)r  tableTag)r   r!   r  r@   r_  _PROCESSING_ORDERSProcessingOrderrH  r@  ReservedrA   SubFeatureFlagsr   rQ   r  r  r   rM  r:   r  r   )r~   r   r   r   r   r   r  orderKeyrP   headerLengthr  	subReaders   &&&&        r/   r   MorxSubtableConverter.read  sz   jjN))+  "T\a'%$,1)<= 33H=//9&&(
	

us{r))
&&(",,. (,,Q[[9
K=KK5 zzC'{{6::

Q^^(Cl(RS4yANN\9999!tooF	 l	i.C..()r1   c                .   VP                  WE4       VP                  4        VP                  R VP                  ,          4       VP                  4        VP	                  RVP
                  R7       VP                  4        VP	                  RVP                  R7       VP                  4        VP                  ^ 8w  d5   VP	                  RRVP                  ,          R7       VP                  4        VP                  RVP                  ,          4       VP                  4        VP	                  RRVP                  ,          R7       VP                  4        VP                  P                  W4       VP                  V4       VP                  4        R	# )
zStructLength=%drF  r   rO  rP  z0x%04xzMorphType=%drQ  r   N)r  r   ry  r@   r   rF  rO  rP  rA   rQ  r:   r'  r  r   s   &&&&&&r/   r   MorxSubtableConverter.xmlWrite  s;   4'+e.@.@@AO53F3FG-U5J5JK>>Q
(U^^2KL.5??:;-X@U@U5UVi.r1   c                `   \        4       p^ p^ Vn        \        \        V4       EF_  w  rgpVR8X  dV   \	        VR,          4      pV^@,          ^ 8g  V^,          ^ 8g  3p	V P
                  V	,          Vn        V P                  WT4       Kc  VR8X  dD   VR,          Vn        VP                  V P                  9   g   Q RVP                  ,          4       hK  VR8X  d:   VR,          Vn	        VP                  R
9   g   Q RVP                  ,          4       hK  VR8X  d   \	        VR,          4      Vn        EK  VR8X  d   \	        VR,          4      Vn
        EK/  VP                  R	4      '       d   VP                  WgW4       EK[  Q T4       h	  V^,          ^,          VP                  ,          Vn        V# )r   CoverageFlagsr   rO  zunknown ProcessingOrder: %srF  zunknown TextDirection %srP  rQ  Morph>   rC  rD  rE  )r!   rP  r  istupler   rN  rO  rH  _PROCESSING_ORDERS_REVERSEDrF  rQ  rH   r1  )
r~   r   r   r   r   covFlagseltNameeltAttrsr  rR  s
   &&&&      r/   r   MorxSubtableConverter.xmlRead  s   N
-3GW-E)Gz/)#HW$56%_2X_4JK$($;$;H$E!77D--$,W$5!((D,L,LL 1A4E4EEL O+"*7"3*KK .@K J&%hw&78
--$,Xg->$?!!!'**		'Z>%g%u1 .F2 n+ajj8
r1   c                   VP                   R ,          ^,	          pV P                  VP                  ,          w  rxYdP                  R8X  d   ^M^ ,          pYg'       d   ^@M^ ,          pYdP                  R8X  d   ^ M^ ,          pYh'       d   ^M^ ,          pWdn        \        VP                  4      p	VP                  4       p
RVn        VP                   pVP                   R,          Vn         VP                  W4       Wn         VP                  V	,          R8X  g   Q hVP                  4       V
,
          p\        P                  ! RV4      VP                  V	&   R# )i   rD  rC  r?  r  r@  z>LN)rP  r\  rO  rF  rY  r  rA  rB  r@   ry   structpack)r~   r   r   r   r   r   r]  reverseOrderlogicalOrderrF  rH  origReservedrI  s   &&&&&&       r/   r   MorxSubtableConverter.write  s   NNZ/B6%)%E%E!!&
" 	//:=D1DLDa///58Da?LDa/&&,,'%%'' ~~&0f#%||K(,????%%'&0$*KKf$=[!r1   r   )FF)TF)FT)TTr+   )rT   r   r   r   rN  rA  r\  r   rH  r   r   r   r   r   r   )r*  r  r   s   00@r/   r9  r9  s  s~      	,~, =O<T<T<V"W<V38<V"W
" 

26(@> >} #Xs   Ar9  c                      a  ] tR tRt o RR/R ltR tR tR tR tR	 t	RR lt
R tR tR tR tR tR tR tR tR tR tRtV tR
# )	STXHeaderi  r>   rg   c          	     (   \         P                  WW#WER 7       \        V P                  \        4      '       g   Q h\        RRR\        4      V n        \        V P                  \        4      '       d   \        RRR\        4      V n
        R# RV n
        R# )r=   GlyphClassesNPerGlyphLookup)rf   r   r  rP   r   r  r=  classLookupr   r  perGlyphLookupr}   s   &&&&&$r/   r   STXHeader.__init__  sv    Z 	 	
 $//95555$^T4Hdoo'<=="+,<dD'"RD"&Dr1   c                $   \        4       pVP                  pVP                  ^ 4      pVP                  ^ 4      pVP                  ^ 4      pRp	Rp
VP                  4       Vn        VP                  WQP                  4       ,           4       VP                  WQP                  4       ,           4       VP                  WQP                  4       ,           4       V P                  e7   VP                  ^ 4      pVP                  WQP                  4       ,           4       \        V P                  \        4      '       d   VP                  ^ 4      p	V	P                  WQP                  4       ,           4       VP                  ^ 4      pVP                  WQP                  4       ,           4       VP                  ^ 4      p
V
P                  WQP                  4       ,           4       V
P                  VP                  ,
          ^,          pV^ 8  g   Q hVP                  V4      Vn        V P                  W4      Vn        MV\        V P                  \        4      '       d7   VP                  ^ 4      p	V	P                  WQP                  4       ,           4       V P                  P!                  WbV4      Vn        \%        VP                  VP                  ,
          VP                  ^,          ,          4      p\'        V4       Ft  p\)        4       pVP*                  P-                  V4       \'        VP                  4       F3  pVP/                  4       pV P1                  VVW)4      VP2                  V&   K5  	  Kv  	  V P                  e   V P5                  VXV4      Vn        V# rR  )r   r   rX  r  GlyphClassCountr   rn  r  rP   r   rD  LigComponents_readLigatures	Ligaturesr    rm  r   rk  r   r   r   StatesrV   r@  _readTransitionTransitions_readPerGlyphLookupsPerGlyphLookups)r~   r   r   r   r   r   classTableReaderstateArrayReaderentryTableReaderactionReaderligaturesReaderperGlyphTableReaderligComponentReadernumLigComponents	numStates
stateIndexstate
glyphClass
entryIndexs   &&&&               r/   r   STXHeader.read   s   jj!..q1!..q1!..q1 & 0 0 2c$4$4$667c$4$4$667c$4$4$667*"("5"5a"8$$S+;+;+=%=>doo':;;!..q1Lc$4$4$667!'!4!4Q!7##C*:*:*<$<=$11!4O  '7'7'9!9: / 3 36H6L6L LQRR#q((("4"D"DEU"VE"11/HEO)=>>!..q1Lc$4$4$667!--223C9U!!$4$8$88U=R=RUV=VW
	  	*JJELL&#E$9$9:
-88:
040D0D$j$1!!*- ; + *$($=$=*D%E! r1   c                    V P                  4       pVP                  VP                  W%P                  ,          ,           4      pVP	                  WcV4       V# r+   )rP   rX  r   r   r  )r~   r   r  r   r}  
transitionentryReaders   &&&&&  r/   rv  STXHeader._readTransition/  sK    __&
))JJ&;&;;;
 	[=r1   c                    \        VP                  4      pW1P                  ,
          ^,          pVP                  VP	                  V4      4      # r  )r  r  r   r  rD  )r~   r   r   limitnumLigatureGlyphss   &&&  r/   rs  STXHeader._readLigatures7  s?    FKK "ZZ/A5$$V%;%;<M%NOOr1   c                Z   ^ pVP                    F  pVP                  P                  4        Fw  p\        V\        4      '       g   K  VP
                  R8w  d   \        W$P
                  ^,           4      pVP                  R8w  g   K[  \        W$P                  ^,           4      pKy  	  K  	  V# )r   r  )ru  rw  rR   r,   r   	MarkIndexmaxCurrentIndex)r~   r   
numLookupsr  r.   s   &&   r/   _countPerGlyphLookupsSTXHeader._countPerGlyphLookups<  s    
 
\\E&&--/a!677{{f,%([[1_%E
~~/%(^^a5G%H
 0 " r1   c                &   VP                   p. p\        V P                  V4      4       Fd  pVP                  ^ 4      pVP	                  WBP                  4       ,           4       VP                  V P                  P                  Ws/ 4      4       Kf  	  V# r   )	r   r   r  rX  r   r  rV   rn  r   )r~   r   r   r   r   lookupsr  r#  s   &&&&    r/   rx  STXHeader._readPerGlyphLookupsK  sz    jjt11%89A!..q1Lc$4$4$667NN4..33LKL : r1   Nc                   \        4       pV P                  P                  WbW4P                  R R7       \	        VP                  4       ^4      p\        VP                  P                  4       4      ^,           p^p	V P                  e
   V	^,          p	WP                  P                  ,          p	V P                  P                  W$P                  4      w  rV P                  W$P                  W4      w  rV	\        V4      ,           pV\        V4      ,           pV\        V4      ,           p\	        V P                  WB4      ^4      pV
e   V\        V4      ,           pMR pR R ppV P!                  WB4      pV P#                  WB4      pVe7   \        V4      ^ 8X  g   Q hV\        V
4      ,           pV\        V4      ,           pVP%                  V4       VP%                  V	4       VP%                  V4       VP%                  V4       V P                  e   VP%                  V4       Ve   VP%                  V4       Ve#   VP%                  V4       VP%                  V4       VP'                  V4       VP'                  V4       VP'                  V4       VP'                  V4       V
e   VP'                  V
4       Ve   VP'                  V4       Ve   VP'                  V4       R # R # )N)r   )r   rm  r   rk  r   rD  r  rR   rn  rP   actionHeaderSizecompileActionsru  _compileStatesr  _compilePerGlyphLookups_compileLigComponents_compileLigaturesr  r  )r~   r   r   r   r   r   glyphClassWriterglyphClassDataglyphClassCountglyphClassTableOffset
actionDataactionIndexstateArrayDataentryTableDatastateArrayOffsetentryTableOffsetperGlyphOffsetperGlyphDataactionOffsetligaturesOffsetligComponentsOffsetligComponentsDataligaturesDatas   &&&&&&                 r/   r   STXHeader.writeT  s   (?I/A/At 	 	
 -88:A>e00779:Q> "*!Q&!!A!AA"&//"@"@||"T
)-)<)<,,*
& 13~3FF+c..AA)C,??477DaH!+c..AALL/3T, 66uC..u;(|$)))".Z"@1C8I4JJO/*/0*+*+*n-#l+*12o.(((&!Z((./$]+ %r1   c           	     N   \        4       p. / rvV F  p\        V4       F  p	VP                  V	,          p
\        4       pV
P                  WV4       VP	                  4       p\        V4      V
P                  8X  g.   Q R \        V
4      V
P                  \        V4      3,          4       hVP                  V4      pVf!   \        V4      pWV&   VP                  V4       VP                  V4       K  	  K  	  \        VP	                  4       ^4      p\        \        V4      ^4      pW3# )z1%s has staticSize %d, but actually wrote %d bytes)r   r   rw  ry   rD  r  r   r8  rQ   rV   rH  r   r   )r~   r   statesr  r  stateArrayWriterentriesentryIDsr  r  r  entryWriter	entryDatar  r  r  s   &&&&&           r/   r  STXHeader._compileStates  s   (?E#O4
"..z:
+o"";kB'224		Nj&;&;;I$))	NM ; &\\)4
%!$WJ*4Y'NN9- ,,Z8# 5 & -88:A>Yw/3--r1   c                   V P                   f   R# V P                  V4      p\        VP                  4      V8X  g$   Q R\        VP                  4      V3,          4       h\	        4       pVP                   FD  pVP                  4       pV P                   P                  Wb/ VR 4       VP                  V^R7       KF  	  VP                  4       # )Nr1   zVlen(AATStateTable.PerGlyphLookups) is %d, but the actions inside the table refer to %dr\  )	rn  r  r  ry  r   rC  r   r^  rD  )r~   r   r   r  r   r$  r/  s   &&&    r/   r  !STXHeader._compilePerGlyphLookups  s    &//6
5(()Z7 	
;5(():67	
7
 ++F!..0L%%l"fdK  ! < ,   ""r1   c                    \        VR 4      '       g   R# \        4       pVP                   F  pVP                  V4       K  	  VP	                  4       # )rr  N)r   r   rr  rH  rD  )r~   r   r   r   	components   &&&  r/   r  STXHeader._compileLigComponents  sF    uo..,,Iy) -  ""r1   c                    \        VR 4      '       g   R# \        4       pVP                   F#  pVP                  VP	                  V4      4       K%  	  VP                  4       # )rt  N)r   r   rt  rH  r  rD  )r~   r   r   r   	glyphNames   &&&  r/   r  STXHeader._compileLigatures  sM    uk**Ity9: )  ""r1   c           	     t   VP                  WE4       VP                  4        VP                  R VP                  ,          4       VP                  4        \	        VP
                  P                  4       4       F(  w  rgVP                  RWgR7       VP                  4        K*  	  \        VP                  4       F  w  rVP                  RVR7       VP                  4        \	        V	P                  P                  4       4       F  w  rVP                  VVRV
/RR7       K  	  VP                  R4       VP                  4        K  	  \        VP                  4       F  w  rVP                  RVR7       VP                  4        \	        VP                  4       4       F(  w  rVP                  R	WR7       VP                  4        K*  	  VP                  R4       VP                  4        K  	  \        VR
4      '       d   VP                  R
4       VP                  4        \        \        VR
4      4       F(  w  rVP                  RWR7       VP                  4        K*  	  VP                  R
4       VP                  4        V P!                  WW4V4       VP                  V4       VP                  4        R# )zGlyphClassCount=%s
GlyphClassr  r   State)indexonGlyphClass
Transition)r   r   r\   rl  r  rr  LigComponent)r  r   N)r  r   ry  rq  r  rk  rA  r   r   ru  rw  r'  r  ry  r   r  _xmlWriteLigatures)r~   r   r   r   r\   r   gklassr  r  r  transr   r$  r  r  s   &&&&&&          r/   r   STXHeader.xmlWrite  sM   4'.1F1FFGu11779:HAAC ; "+5<<!8Jwj9%+E,=,=,C,C,E%F!
):6%	   &G W% "9 #5#8#89IA/q9$V\\^4
##HE#E!!# 5 -. : 5/**/#GE?$CD##N!#G!!# E _-	eDr1   c                4   \        VR 4      '       g   R# VP                  R 4       VP                  4        \        \	        VR 4      4       F(  w  rgVP                  RWgR7       VP                  4        K*  	  VP                  R 4       VP                  4        R# )rt  NLigature)r  r  )r   r  r   r   r  r   r  )r~   r   r   r   r\   r   r   r  s   &&&&&&  r/   r  STXHeader._xmlWriteLigatures  s    uk**;'ge[9:DA
!= ; 	%r1   c                ~   \        4       p\        \        V4       F  w  rVpVR 8X  d-   VR,          pVR,          p	\        V	4      VP                  V&   K9  VR8X  d0   V P                  WgV4      p
VP                  P                  V
4       Ko  VR8X  d:   V P                  P                  WgV4      pVP                  P                  V4       K  VR8X  d   V P                  WgV4      Vn        K  VR8X  g   K  V P                  WgV4      Vn        K  	  \        VP                  P!                  4       4      ^,           Vn        V# )r  r  r   r  rl  rr  rt  )r   r  r[  r   rk  _xmlReadStateru  rV   rn  r   ry  _xmlReadLigComponentsrr  _xmlReadLigaturesrt  r  rR   rq  )r~   r   r   r   r   r^  r_  r  r  r   r  r$  s   &&&&        r/   r   STXHeader.xmlRead  s   -3GW-E)Gz,& ) ),4UO""5)G#**8F##E*,,,,44X4P%%,,V4O+&*&@&@$'# K'"&"8"8t"T! .F" !$E$6$6$=$=$? @1 Dr1   c                    \        4       p\        \        V4       FQ  w  rVpVR 8X  g   K  \        VR,          4      pV P	                  4       p	V	P                  WVWs4       WP                  V&   KS  	  V# )r  r  )r   r  r[  r   rP   r1  rw  )
r~   r   r   r   r  r^  r_  r  r  r  s
   &&&&      r/   r  STXHeader._xmlReadState  sh    
-3GW-E)Gz,&%h~&>?
!__.
""7jG0:!!*- .F r1   c                    . p\        \        V4       F0  w  rVpVR 8X  g   K  VP                  \        VR,          4      4       K2  	  V# )r  r   )r  r[  rV   r   )r~   r   r   r   ligComponentsr^  r_  _eltContents   &&&&    r/   r  STXHeader._xmlReadLigComponents  sF    .4Wg.F*G{.($$Xhw.?%@A /G r1   c                    . p\        \        V4       F'  w  rVpVR 8X  g   K  VP                  VR,          4       K)  	  V# )r  r  )r  r[  rV   )r~   r   r   r   ligsr^  r_  r  s   &&&&    r/   r  STXHeader._xmlReadLigatures  s>    .4Wg.F*G{*$HW-. /G r1   )rm  rn  r+   )rT   r   r   r   r   r   rv  rs  r  rx  r   r  r  r  r  r   r  r   r  r  r  r   r   r   s   @r/   ri  ri    sj     	'R 	'-^P
5,n.4# ##&P	, r1   ri  c                   <   a  ] tR tRt o R tRR ltR tR tRtV t	R# )	CIDGlyphMapi'  c                    VP                  4       p/ p\        VP                  V4      4       F!  w  rgVR 8w  g   K  VP                  V4      WV&   K#  	  V# )r  )r@  r   rD  r  )r~   r   r   r   numCIDsr&  cidr  s   &&&&    r/   r   CIDGlyphMap.read(  sS    ##%%f&<&<W&EFLC& "//8 G r1   Nc                6   VP                  4        UUu/ uF  w  rgWbP                  V4      bK  	  pppV'       d   \        V4      ^,           M^ p	VP                  V	4       \	        V	4       F$  pVP                  VP                  VR4      4       K&  	  R# u uppi )r&  r  NrA  r  r  rH  r   rQ   )
r~   r   r   r   r   r   r  r  rA  r   s
   &&&&&&    r/   r   CIDGlyphMap.write0  sv    ?D{{}M}ooe,,}M"'E
QQ5!<Cuyyf56   Ns   Bc                    / p\        \        V4       F9  w  rVpVR 8X  g   K  VR,          P                  4       V\        VR,          4      &   K;  	  V# )CIDr  r  )r  r[  stripr   r~   r   r   r   r&  eNameeAttrs	_eContents   &&&&    r/   r   CIDGlyphMap.xmlRead7  sL    (.w(@$E9~28/2G2G2Ixu./ )A r1   c                2   VP                  WE4       VP                  4        \        VP                  4       4       F7  w  rgVf   K  VR8w  g   K  VP	                  RWgR7       VP                  4        K9  	  VP                  V4       VP                  4        R # )Nr  r  )r  r  r  r   r  rA  r   r  )r~   r   r   r   r\   r   r  r  s   &&&&&&  r/   r   CIDGlyphMap.xmlWrite>  sz    4' /JC Uf_##Es#@!!# 0 	r1   r   r+   r7  r   s   @r/   r  r  '  s     7 r1   r  c                   <   a  ] tR tRt o R tRR ltR tR tRtV t	R# )	GlyphCIDMapiI  c                l   VP                  4       pVP                  4       pVP                  V4      pV\        V4      8  d(   \        P                  R V\        V4      3,          4       / p\        \        \        V4      \        V4      4      4       F  pWh,          p	V	R8w  g   K  WWH,          &   K   	  V# )zOGlyphCIDMap has %d elements, but the font has only %d glyphs; ignoring the restr  )r  r@  rD  r  r  r  r   min)
r~   r   r   r   
glyphOrderr   cidsr&  r  r  s
   &&&&      r/   r   GlyphCIDMap.readJ  s    '')
!!#%%e,3z?"KK$',c*o&>?
 STC
O<=G-Cf}.1z*+ > r1   Nc                V   VP                  4        UUu/ uF&  w  rgVf   K  VR8w  g   K  VP                  V4      VbK(  	  pppV'       d   \        V4      ^,           M^ p	VP                  V	4       \	        V	4       F$  p
VP                  VP                  V
R4      4       K&  	  R # u uppi )Nr  r  )r~   r   r   r   r   r   r  r  rA  r   r  s   &&&&&&     r/   r   GlyphCIDMap.write[  s      ++-
' $#&&= $DOOA#' 	 

 #(E
QQ5!U|Guyy&9: $
s   B%B%B%c                    / p\        \        V4       F*  w  rVpVR 8X  g   K  \        VR,          4      WFR,          &   K,  	  V# )r  r   r  )r  r[  r   r  s   &&&&    r/   r   GlyphCIDMap.xmlReadf  sA    (.w(@$E9~*26'?*Cg' )A r1   c                2   VP                  WE4       VP                  4        \        VP                  4       4       F7  w  rgVf   K  VR8w  g   K  VP	                  RWgR7       VP                  4        K9  	  VP                  V4       VP                  4        R # )Nr  r  r  r  )r~   r   r   r   r\   r   r  r  s   &&&&&&  r/   r   GlyphCIDMap.xmlWritem  sy    4' /JE3&=##E#B!!# 0 	r1   r   r+   r7  r   s   @r/   r  r  I  s     "	; r1   r  c                   <   a  ] tR tRt o R tRR ltR tR tRtV t	R# )	
DeltaValueix  c                   VR ,          pVR,          pVR,          pVR9   g   Q R4       hWT,
          ^,           p^V,          p^V,          p	^V,          ^,
          p
^V^,
          ,          p. p^ ^ r\        V4       F[  pV^ 8X  d   VP                  4       ^rW,
          pW,	          V
,          pVV,          '       d
   VV	,
          pVP                  V4       K]  	  V# )	StartSizeEndSizeDeltaFormatillegal DeltaFormatr&  r      )r   r@  rV   )r~   r   r   r   r  r  r  nItemsnBitsminusOffsetmasksignMaskr  tmpshiftr   r   s   &&&&             r/   r   DeltaValue.ready  s    k*	I&.i'>)>>'$q([ 5jU
a#
UvAz#..0"UME\T)Ex+e$  r1   Nc                   VR ,          pVR,          pVR,          pTp	VR9   g   Q R4       hWv,
          ^,           p
^V,          p\        V	4      V
8X  g   Q h^V,          ^,
          p^ ^rV	 F>  pW,
          pWV,          V,          ,          pV^ 8X  g   K*  VP                  V4       ^ ^rK@  	  V^8w  d   VP                  V4       R# R# )r  r  r  r  Nr	  )r  rH  )r~   r   r   r   r   r   r  r  r  r  r  r  r  r  r  s   &&&&&&         r/   r   DeltaValue.write  s    k*	I&.
i'>)>>'$q([ :&(((U
aUEME$,501Cz""3'U   B;s# r1   c                \    VP                  WER V3.,           4       VP                  4        R# r   r   r   r   s   &&&&&&r/   r   DeltaValue.xmlWrite  )    DGU+;*<"<=r1   c                &    \        VR ,          4      # r   r   r   s   &&&&r/   r   DeltaValue.xmlRead      g''r1   r   r+   
rT   r   r   r   r   r   r   r   r   r   r   s   @r/   r  r  x  s     .$*( (r1   r  c                   0   a  ] tR tRt o R tRR ltRtV tR# )VarIdxMapValuei  c                   VR ,          pVR,          p^V^,          ,           p^V,          ^,
          pRV,
          p^V,
          p	^V^0,          ^,	          ,           p
^VP                   ^VP                  ^VP                  ^VP                  /V
,          pV! V4       Uu. uF  pW,          V	,          W,          ,          NK!  	  up# u upi )EntryFormatrq   l    rb  rD  readUInt24Arrayr  )r~   r   r   r   fmtr  	innerBits	innerMask	outerMask
outerShift	entrySizer   raws   &&&&         r/   r   VarIdxMapValue.read  s    &>*v&	)^q(	*	)^
#,1,-	v$$v%%v%%v$$	

 	 !(
( :-#/BB(
 	
 
s   %CNc                   VR ,          pTpVR,          P                  \        V4      4       ^V^,          ,           p^V,          ^,
          p	^V,
          p
^V^0,          ^,	          ,           p^VP                  ^VP                  ^VP                  ^VP
                  /V,          pT! V Uu. uF   pVR,          V
,	          W,          ,          NK"  	  up4       R# u upi )r!  rq   l      N)setValuer  rh  rL  writeUInt24Arrayr#  )r~   r   r   r   r   r   r$  r  r%  r&  r(  r)  r   idxs   &&&&&&        r/   r   VarIdxMapValue.write  s    &~''G5v&	)^q(	)^
#,1,-	v%%v&&v&&v%%	

 
 	 #"C #
2sGG"	
s   ,&Cr   r+   rL  r   s   @r/   r  r    s     
,
 
r1   r  c                   <   a  ] tR tRt o R tRR ltR tR tRtV t	R# )	VarDataValuei  c                x   . pVR ,          pVR,          p\        VR,          4      pVR,          pV'       d   VP                  VP                  rMVP                  VP                  r\	        WV4      \        WV4      rVP                  V! V
4      4       VP                  V	! W,
          4      4       W8  d   WER1 V# )rp   	NumShorts     N)boolr  r4  rT  r  r  extend)r~   r   r   r   rR   regionCount	wordCount	longWordsreadBigArrayreadSmallArrayn1n2s   &&&&        r/   r   VarDataValue.read  s     01k*	 V+,	&	+1+?+?AVAV.+1+@+@&BVBV.[,c+.IBl2&'nRW-.|$r1   Nc                x   VR ,          pVR,          p\        VR,          4      pVR,          pRVP                  VP                  3RVP                  VP                  3/V,          w  r\	        Wg4      \        Wg4      rV	! VRV 4       V
! WKV 4       W8  d"   VP                  ^ .W,
          ,          4       R# R# )rp   r4  r5  r6  FTN)r7  r:  rZ  r  r  r  writeSmallArray)r~   r   r   r   rR   r   r9  r:  r;  writeBigArrayrB  r>  r?  s   &&&&&&       r/   r   VarDataValue.write  s     01k*	 V+,	&	 F**F,A,AB6((&*@*@A,
 ,(
 [,c+.IBfSbk"+./""A3"*:#;< r1   c                \    VP                  WER V3.,           4       VP                  4        R# r   r  r   s   &&&&&&r/   r   VarDataValue.xmlWrite  r  r1   c                &    \        VR ,          4      # r   r  r   s   &&&&r/   r   VarDataValue.xmlRead  r  r1   r   r+   r  r   s   @r/   r2  r2    s     .=&( (r1   r2  c                   <   a  ] tR tRt o R tRR ltR tR tRtV t	R# )	TupleValuesi  c                >    \         P                  ! R V4      ^ ,          # r+   )r	   decompileDeltas_)r~   r  r   s   &&&r/   r   TupleValues.read  s    ..tT:1==r1   Nc                z    VP                   \        ,          p\        \        P                  ! WF'       * R 7      4      # ))optimizeSize)cfgr   bytesr	   compileDeltaValues_)r~   r   r   r   rR   r   optimizeSpeeds   &&&&&& r/   r   TupleValues.write  s/    !45..vDUV
 	
r1   c                &    \        VR ,          4      # r   r  r   s   &&&&r/   r   TupleValues.xmlRead  r  r1   c                \    VP                  WER V3.,           4       VP                  4        R# r   r  r   s   &&&&&&r/   r   TupleValues.xmlWrite  r  r1   r   r+   r7  r   s   @r/   rJ  rJ    s     >
( r1   rJ  c                   V   a  ] tR tRt o RRRRRRR/R lltR tRR	 ltR
 tR tRt	V t
R# )	CFF2Indexi"  N	itemClassitemConverterClassr>   rg   c          	     t    \         P                  WW#WGR 7       WPn        Ve   V! 4       V n        R# RV n        R# r?  )rf   r   
_itemClass
_converter)r~   r\   r]   r^   rP   r[  r\  r>   s   &&&&&$$$r/   r   CFF2Index.__init__#  sB     	Z 	 	
 $$6$B  	HL 	r1   c                  a aaaaa SP                  4       oS^ 8X  d   . # SP                  4       oR oS! SS4      pSP                  RJ;'       d    S^8  pV'       g   V! S^,           4      p. pVP                  ^ 4      pSP	                  V^,
          4       V F  p	W8:  g   Q hSP	                  W,
          4      p
S P
                  e1   S P                  4       pVP                  V
SSP                  4       Tp
M*S P                  e   S P                  P                  V
S4      p
VP                  V
4       T	pK  	  V# VVVVVV 3R lpV! 4       p\        V.S,          4      pV# )r   c                 t    ^V P                   ^V P                  ^V P                  ^V P                  /V,          # )r&  r"  )r   offSizes   &&r/   getReadArray$CFF2Index.read.<locals>.getReadArray<  sB    6((6))6))6((	
  r1   Fc                     <aaaa S	P                  4       oS	P                  oSS^,           S,          ,           ^,
          oS! SS4      oVVVVVVV
3R lp V # )r&  c                   < S	P                  SV S,          ,           4       S! ^4      pS	P                  SV^ ,          ,           4       S	P                  V^,          V^ ,          ,
          4      pS
P                  e2   S
P                  4       pVP                  VSS	P                  4       TpV# S
P
                  e   S
P
                  P                  VS4      pV# r  )r   r  r^  r  
localStater_  r   )r   r%  r'  objdata_posr   rc  
offset_posr   r   r~   s   &   r/   r   8CFF2Index.read.<locals>.get_read_item.<locals>.read_itemc  s    $$Z!g+%=>'lG$$X
%:;&//
WQZ0GHD2"oo/dD+2H2HI"  K 4#33D$?Kr1   r   )r   rj  rk  r   r   r   r   rd  rc  r   r~   s    @@@@r/   r   %CFF2Index.read.<locals>.get_read_item]  sM    $kkm#ZZ
%g(==A(g>	    ! r1   )r  r_  r   popr  r^  r  rh  r_  r   rV   r   )r~   r   r   r   r   r   r%  rA  
lastOffsetrY  r'  ri  r   r   r   r   rd  rc  s   fff&           @@@r/   r   CFF2Index.read6  sF     "A:I""$	 !1	yy%33%!)	*GE QJOOJN+!!+++v':;??.//+CMM$f.?.?@D__0??//d;DT"#
 " L! !, &I)u,-A Hr1   c                   TpVP                  \        V4      4       \        V4      '       g   R # V P                  e!   V Uu. uF  qwP                  V4      NK  	  ppMGV P                  e:   \        V4       UUu. uF"  w  rV P                  P                  WW7V4      NK$  	  pppV Uu. uF  p\        V4      NK  	  p	p\        \        V	^R7      4      p	V	R,          p
V
R8  d   ^MV
R8  d   ^M
V
R8  d   ^M^pVP                  V4       ^VP                  ^VP                  ^VP                  ^VP                  /V,          pV! V	4       V F  pVP                  V4       K  	  R # u upi u uppi u upi )N)initial   i   i   r  )r  r  r^  ry   r_  r   r   r  r&   re  rh  rL  r.  r#  r  )r~   r   r   r   rR   r   rA  r'  r   r%  ro  rc  r   s   &&&&&&       r/   r   CFF2Index.writez  sp   #e*%5zz??&49:ED\\$'EE:E__(  )//GA %%fIQG/  
 *//3t9/z'156R[
 E!  7*Z)5KQR 	
 	'" v%%v&&v&&v%%	

 
 	7DT" 5 ;
 0s   E):(E.)E4c                    V P                   e&   V P                  4       pVP                  R WV4       V# V P                  e   V P                  P                  WV4      # \	        4       hr+   )r^  r1  r_  r   r   )r~   r   r   r   ri  s   &&&& r/   r   CFF2Index.xmlRead  sW    ??&//#CKKed3J__(??**54@@%''r1   c           
         V P                   e-   \        V4       F  w  rgVP                  WRV3.V4       K  	  R # V P                  e>   \        V4       F,  w  rgV P                  P	                  WWtVRV3.,           4       K.  	  R # \        4       h)Nr  )r^  r   r'  r_  r   r   )r~   r   r   r   r\   r   r   r'  s   &&&&&&  r/   r   CFF2Index.xmlWrite  s}    ??&$U+

9gq\NDA ,__($U+((T7A,1G ,
 &''r1   )r_  r^  r+   )rT   r   r   r   r   r   r   r   r   r   r   r   s   @r/   rZ  rZ  "  sD     
 
  
 
&BH##J(
( 
(r1   rZ  c                   &   a  ] tR tRt o R tRtV tR# )
LookupFlagi  c                L   VP                  WER V3.,           4       . pV^,          '       d   VP                  R4       V^,          '       d   VP                  R4       V^,          '       d   VP                  R4       V^,          '       d   VP                  R4       V^,          '       d   VP                  R4       VR,          '       d    VP                  RV^,	          ,          4       V'       d!   VP                  RP                  V4      4       VP	                  4        R	# )
r   rightToLeftignoreBaseGlyphsignoreLigaturesignoreMarksuseMarkFilteringSeti   zmarkAttachmentType[%i]r  N)r   rV   ry  r  r   r  s   &&&&&& r/   r   LookupFlag.xmlWrite  s    DGU+;*<"<=4<<LL'4<<LL+,4<<LL*+4<<LL'4<<LL./6>>LL1UaZ@Achhuo.r1   r   Nr{  r   s   @r/   rz  rz    s      r1   rz  c                   V   a a ] tR tRt o]tV 3R lt]R 4       t]R 4       t	Rt
VtV ;t# )
_UInt8Enumi  c                B   < V P                  \        SV `	  WV4      4      # r+   )	enumClassr  r   )r~   r   r   r   r  s   &&&&r/   r   _UInt8Enum.read  s    ~~egl6CDDr1   c                J    \        V P                  VP                  4       4      # r+   )r  r  upperr  s   &&r/   r   _UInt8Enum.fromString  s    s}}ekkm44r1   c                T    V P                  V4      P                  P                  4       # r+   )r  r\   lowerr  s   &&r/   r   _UInt8Enum.toString  s     }}U#((..00r1   r   )rT   r   r   r   r   r  r   r  r   r   r   r   r  r  s   @@r/   r  r    s=     IE 5 5 1 1 1r1   r  c                       ] tR tRt]tRtR# )r"   i  r   N)rT   r   r   r   _ExtendModer  r   r   r1   r/   r"   r"     s    Ir1   r"   c                       ] tR tRt]tRtR# )r#   i  r   N)rT   r   r   r   _CompositeModer  r   r   r1   r/   r#   r#     s    Ir1   r#   int8int16int32r6   r4   uint24r7   char64rb  OffsetLOffsetOffset24	TupleList)r\  VarCompositeGlyphList)r[  rD   rE   rF   r!   c                 $    \        \        V R 7      # )rP   )r'   r  Cs   &r/   r0   r0         79;r1   c                 $    \        \        V R 7      # r  )r'   r  r  s   &r/   r0   r0     s    1HUV)Wr1   c                 $    \        \        V R 7      # r  )r'   ri  r  s   &r/   r0   r0     r  r1   OffsetToc                 $    \        \        V R 7      # r  )r'   rS   r  s   &r/   r0   r0     s    '%A6r1   	LOffsetToc                 $    \        \        V R 7      # r  )r'   rb  r  s   &r/   r0   r0     s    76a8r1   LOffset24Toc                 $    \        \        V R 7      # r  )r'   ri  r  s   &r/   r0   r0     s    WW;r1   )|fontTools.misc.fixedToolsr   r  r   r  r   r  r   r  r   r  r   r  %fontTools.ttLib.tables.TupleVariationr	   fontTools.misc.roundToolsr
   r   fontTools.misc.textToolsr   r   r   r   r   fontTools.misc.lazyToolsr   fontTools.ttLibr   r   r  r   r   r   r   r   otTablesr   r   r   r   r   r   r   r    r!   r"   r  r#   r  r$   	itertoolsr%   r&   	functoolsr'   typesr(   r   rb  typingr)   logging	getLoggerrT   r  r[  rd   objectrf   r   r   r   r   r  r(  r-  r/  r=  rO  r]  rk  rv  rI   rJ   rK   r  r  r  r  r  r  r  r  r  r  r  r  r  r  rN   rL   rS   rb  ri  r:   r8   r9   r;   r3   r  r  r  r9  ri  r  r  r  r  r2  rJ  rZ  rz  r  rM   r   r1   r/   <module>r     sQ    A J M M - ?     .  ! 	    !
(=(@eF eP/- /"K { &8 & 'H '  e  !}e !'H ' (X ( &8 & 'H ' "X " (  	K 		[& 		K 	+ Ak A& 
V    . .0Z 0:N  n  >G >0% k 0[ >D4] D4N>v >6+F +DU e M MLu LG&( GLE L8( 8&+ 0t t|8=m 8=v|>M |>Bp pf	- D,- ,^2( 2(j-
] -
`0(= 0(f $Q( Q(h *1 1 J 2
D2 U2 T	2
 U2 f2 f2 e2 f2 w2 2 w2 
32 w2 2  f!2" *#2$ U%2& w'2( U)2* ;+2, f-2. e/20 v122 324 ;526 *728 n92: L;2< *=2> *?2@ ]A2B C2D {CE2F WY:KLG2J ;;!$!);W;68;c2 r1   