L iR ddlmZddlmZmZddlmZddlmZddlZddl Z ddl Z ddl Z ddl m Z ddlmZmZmZmZe j&eZd Z ddlZeeed dZeed ZGd d eZGddeZ GddeZ!GddeZ"e#e jHdddk(sJe jdjJdk(sJdGddeZ&GddeZ'GddeZ(GddeZ)dZ*d Z+d!Z,d"Z-Gd#d$eZ.Gd%d&e.Z/Gd'd(e/Z0e/e0d)Z1d*Z2e d5d+e.d,ee3d-ee4fd.Z5gd/Z6d0Z7e7Z8Gd1d2eZ9Gd3d4eZ:y#e$rY!wxYw)6)OPTIONS)Tag bytesjoin) DefaultTable)IntEnumN) lru_cache)Iterator NamedTupleOptionalTupleFrepackz:USE_HARFBUZZ_REPACKERceZdZdZdZy)OverflowErrorRecordch|d|_|d|_|d|_|d|_|d|_y)Nrr) tableTypeLookupListIndex SubTableIndexitemName itemIndex)self overflowTuples c/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/fontTools/ttLib/tables/otBase.py__init__zOverflowErrorRecord.__init__s@&q),Q/*1-%a( &q)c t|jd|jd|jd|jd|j f S)Nz LookupIndex:zSubTableIndex:z ItemName:z ItemIndex:)strrrrrrrs r__repr__zOverflowErrorRecord.__repr__$sG$$ ""    rN)__name__ __module__ __qualname__rr"rrrrs *  rrceZdZdZdZy)OTLOffsetOverflowErrorc||_yNvalue)roverflowErrorRecords rrzOTLOffsetOverflowError.__init__5s ( rc,t|jSr*)reprr,r!s r__str__zOTLOffsetOverflowError.__str__8sDJJrN)r#r$r%rr0r&rrr(r(4s ) rr(ceZdZdZdZdZy) RepackerStaterrrN)r#r$r%PURE_FTHB_FT FT_FALLBACKr&rrr2r2<sG EKrr2cBeZdZdZdZdZdZdZdZdZ dZ d d Z y ) BaseTTXConverterzGeneric base class for TTX table converters. It functions as an adapter between the TTX (ttLib actually) table model and the model we use for OpenType tables, which is necessarily subtly different. cddlm}t||j}t ||j}||_|j j ||y)zFCreate an object from the binary data. Called automatically on access.rotTablestableTagN)r: OTTableReaderr<getattrtable decompile)rdatafontr:reader tableClasss rrAzBaseTTXConverter.decompileWsBtdmm<Xt}}5 \  VT*rcd}|jt}|jdvr^|dur!tj d|jn9t s3|dur t d|Jtj d|j|dvr%t r|jdvrtj}ntj}d}d} t|j }|jj|||tjk(r|j||S|tjk(r|j|S|tjk(r6|j|tj d tj}#t $rk}d}|j#|||} |j$}| rYd}~|tjur&tj d tj}nYd}~pd}~wwxYw) z=Compiles the table into binary. Called automatically on save.N)GSUBGPOSFz>hb.repack disabled, compiling '%s' with pure-python serializerTzNo module named 'uharfbuzz'z?uharfbuzz not found, compiling '%s' with pure-python serializer)NTr;zXRe-enabling sharing between extensions and switching back to harfbuzz+fontTools packing.zrHarfbuzz packing out of resolutions, disabling sharing between extensions and switching to fontTools only packing.)cfgUSE_HARFBUZZ_REPACKERr<logdebughave_uharfbuzz ImportErrorr2r4r3 OTTableWriterr@compiletryPackingHarfbuzztryPackingFontToolsr5r(tryResolveOverflowr,) rrCoverflowRecord use_hb_repackstatehb_first_error_loggedlastOverflowRecordwritereoks rrPzBaseTTXConverter.compile`s.!67 ==, ,% TMM$ D(%&CDD(000IIY  \ ) !11!''E!))E %!! & > ""640M///226;PQQm33333F;;m777,,V4II6*//E#&* (,%,,T16HI%&WW"M///II?*55E s,AF#FB  " " * 4#D.9B 6%dN;B I 1!$77rc<|jj||yr*)r@toXML2)rrYrCs rtoXMLzBaseTTXConverter.toXMLs &$'rcddlm}t|ds"t||j}||_|j j |||||j jy)Nrr9r@)r=r:hasattrr?r<r@fromXMLpopulateDefaults)rnameattrscontentrCr:rEs rrrzBaseTTXConverter.fromXMLsPtW% 4==9J#DJ 46 ##%rc<|jj|y)N)recurse)r@ensureDecompiled)rrxs rryz!BaseTTXConverter.ensureDecompileds ##G#4rNT) r#r$r%__doc__rArPrQrRrSrorrryr&rrr7r7Qs1 +Yv=,#88(&5rr7irz#Oops, file a bug against fonttools.ceZdZdZdZddZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZy)r>z5Helper class to retrieve data from an OpenType table.rBoffsetpos localStater<NcJ||_||_||_||_||_yr*r~)rrBrrr<s rrzOTTableReader.__init__ s%  $  rc.|xj|z c_yr*rrcounts radvancezOTTableReader.advances Erc||_yr*r)rrs rseekzOTTableReader.seeks rc|j|j|j|j|j}|j |_|Sr*) __class__rBrrr<rrothers rcopyzOTTableReader.copys6tyy$//4;; VHH  rc|j|z}|j|j|j||jSr*)rrrBrr<)rrs r getSubReaderzOTTableReader.getSubReaders1v%~~dii&$--PPrc|j}||z}tjd||j||\}||_|SN>rstructunpackrB)rtypecode staticSizernewposr,s r readValuezOTTableReader.readValue sDhhz!==1XJ3v1FG rc|j}|||zz}tj||j||}tjdk7r|j ||_|j SNbig)rarrayrBsys byteorderbyteswaptolist)rrrrrrr,s r readArrayzOTTableReader.readArray's^hhuz)) HdiiF&;< ==E ! NN ||~rc(|jddS)Nbrrrr!s rreadInt8zOTTableReader.readInt80~~ca~00rc*|jdd|S)Nrrrrrrs r readInt8ArrayzOTTableReader.readInt8Array3~~cau~==rc(|jddS)Nhrrrr!s r readShortzOTTableReader.readShort6rrc*|jdd|S)Nrrrrrs rreadShortArrayzOTTableReader.readShortArray9rrc(|jddS)Nr|rrrr!s rreadLongzOTTableReader.readLong<rrc*|jdd|S)Nr|rrrrs r readLongArrayzOTTableReader.readLongArray?rrc(|jddS)NBrrrr!s r readUInt8zOTTableReader.readUInt8Brrc*|jdd|S)Nrrrrrs rreadUInt8ArrayzOTTableReader.readUInt8ArrayErrc(|jddS)NHrrrr!s r readUShortzOTTableReader.readUShortHrrc*|jdd|S)Nrrrrrs rreadUShortArrayzOTTableReader.readUShortArrayKrrc(|jddS)NIrrrr!s r readULongzOTTableReader.readULongNrrc*|jdd|S)Nrrrrrs rreadULongArrayzOTTableReader.readULongArrayQrrc|j}|dz}tjdd|j||z\}||_|S)Nrz>lrrrrr,s r readUInt24zOTTableReader.readUInt24TsBhhq==utyyV/D'DE rcZt|Dcgc]}|jc}Scc}wr*)ranger)rr_s rreadUInt24ArrayzOTTableReader.readUInt24Array[s!+0<8a!888s(c|j}|dz}t|j||}t|dk(sJ|||_|SNr)rrrBlenrs rreadTagzOTTableReader.readTag^sJhhqDIIc&)*5zQ%% rcT|j}||z}|j||}||_|Sr*)rrB)rrrrr,s rreadDatazOTTableReader.readDatafs0hhu #f% rc||jr|jjn t}|||<||_yr*rrdictrrtr,rVs r __setitem__zOTTableReader.__setitem__m.*.//$$&tvd rc<|jxr|j|Sr*rrrts r __getitem__zOTTableReader.__getitem__rs84??4#88rc:|jxr||jvSr*rrs r __contains__zOTTableReader.__contains__us:44??#::r)NrN)r#r$r%r{ __slots__rrrrrrrrrrrrrrrrrrrrrrrrrrr&rrr>r>s?CI! Q1>1>1>1>1>1>9 9;rr>ceZdZdZdZdZy)OffsetToWriterc ||_||_yr*) subWriter offsetSizerrrs rrzOffsetToWriter.__init__zs"$rct|t|k7rtS|j|jk(xr|j|jk(Sr*)rcNotImplementedrrrs r__eq__zOffsetToWriter.__eq__~s? :e $! !~~0XT__HXHX5XXrcDt|j|jfSr*)hashrrr!s r__hash__zOffsetToWriter.__hash__sT^^T__566rN)r#r$r%rrrr&rrrrys%Y 7rrceZdZdZd)dZdZdZdZdZdZ d Z d Z d Z d Z d*d ZdZdZdZd+dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ d Z!d!Z"d"Z#d#Z$d$Z%d,d%Z&d&Z'd'Z(d(Z)y)-rOz=Helper class to gather and assemble data for OpenType tables.NcXg|_d|_||_||_d|_d|_y)N)itemsrrr<parentrt)rrr<s rrzOTTableWriter.__init__s, $    rc||jr|jjn t}|||<||_yr*rrs rrzOTTableWriter.__setitem__rrc |j|Sr*rrs rrzOTTableWriter.__getitem__st$$rc|j|=yr*rrs r __delitem__zOTTableWriter.__delitem__s OOD !rcd}|jD]H}t|dr||jz }t|dr||jz };|t |z}J|S)z|j|}|tur|S| Sr*rrrrresults r__ne__zOTTableWriter.__ne__$U#>1vA6zArcnt|t|k7rtS|j|jk(Sr*)rcrrrs rrzOTTableWriter.__eq__s+ :e $! !zzU[[((rct|d}t|d}|r|si}|j}t|D]\}}t|dr|j||<&t|ds3|jj |||rS|j |j|j||_t||_y)N Extension DontSharerrshareExtension)rqrrrr _doneWriting setdefaulttuple)rinternedTablesr isExtension dontSharerr|rs rrzOTTableWriter._doneWritingsdK0 D+. ~N  ' GAtt^,,,.a{+++">,!)7)B)B*E!H& "5\ rcd|t|<t|j}tt |}|j t |d}|}|r|Jd|di}}}d}t |drt |D]<} |j| } t | dst| jdddk(s:d}nt j|vr| jj|||n |D]u} |j| } t | ds|r | d k(rt| jdddk(rAt| j|vr| jj|||vw|j|y) NTrzUProgram or XML editing error. Extension subtables cannot contain extensions subtablesFsortCoverageLastrrtCoverager) idrrrrreverserqr?r _gatherTablesappend) rtables extTablesdoneriRanger selfTablesrr|rs rr"zOTTableWriter._gatherTables sRXtzz?eHo&dK0  % gf g%&/rtIF! 4+ ,8_ zz!}D+.=K'+$ $..!-,,VYE A::a=D4-!!VDNNFD9ZG$..!-,,VYE# & $rcg}g}|}|D]} |jdd| fd} d} t|drut|jD]]\} } t | dddk(sd} t | |vr| j |||||x} }n|t | } |j| nd}d}t|jD]\} } t| dr|}n+t| dr|| jz }1|t| z}@t | j|vr"| jj |||||x}}n|t | j}|| j|f}|j||| jz }|j||j||f|d z }||t |<| r|j|S) NrFrrtrTrrr) r#rqrrr?r _gatherGraphForHarfbuzzrrrrpop)rr$obj_listr&objidx virtual_edges real_links virtual_linksitem_idxidxr coverage_idxr|r child_idx offset_posr real_edges rr*z%OTTableWriter._gatherGraphForHarfbuzzJs  ! .C  !Q - .! 4+ ,$TZZ0 44.*<'+$$xt+262N2N"HdHm3 x(,BtH~ !((6    , *GAtt[) ~.dii' '#d)3 $..!-'+~~'M'MHdHm( H!DNN!34 dooy9I   i ( $// )J' **  d]34A !RX     rci}|j|dg}g}i}d}g}|j|||||d}|D]} || _|| jz}g} |D]#} | j } | j | %t tdr tjt|| |Stj| |S)aThe Whole table is represented as a Graph. Assemble graph data and call Harfbuzz repacker to pack the table. Harfbuzz repacker is faster and retain as much sub-table sharing as possible, see also: https://github.com/harfbuzz/harfbuzz/blob/main/docs/repacker.md The input format for hb.repack() method is explained here: https://github.com/harfbuzz/uharfbuzz/blob/main/src/uharfbuzz/_harfbuzz.pyx#L1149 Trrrepack_with_tag) rr*rrr r#rqrar8r r) rr<rr$r,r&r-r.rr@rB tableDatas rr^z%OTTableWriter.getAllDataUsingHarfbuzzs .>  $$VXtV]S .EEI++--C . #E002I KK " # 2( )%%c(mT8D D99T8, ,rc|ri}|j|g}g}i}|j||||j|jd}|D]}||_||j z}|D]}||_||j z}g}|D]#}|j } |j | %|D]#}|j } |j | %t|S)z+Assemble all data, including all subtables.r)rr"r!rrrr#r) rr]rr$r%r&rr@rBr9s rrezOTTableWriter.getAllDatas  N   n -  69d3 .EEI++--C . .EEI++--C . #E I KK " # #E I KK " #rc`|j|j|j}||_|Sr*)rrr<r)r subwriters r getSubWriterzOTTableWriter.getSubWriters-NN4??DMMB   rch|jjtjd||yrrr#rpack)rrr,s r writeValuezOTTableWriter.writeValues% &++(ne<=rctj||}tjdk7r|j|jj |j yr)rrrrrr#tobytes)rrvaluesas r writeArrayzOTTableWriter.writeArrays? KK& ) ==E ! JJL !))+&rcd|cxkr dksJ|J||jjtjd|y)Niz>br?rr,s r writeInt8zOTTableWriter.writeInt8sBu"s")E)")E)" &++dE23rc(|jd|y)NrrFrrDs rwriteInt8ArrayzOTTableWriter.writeInt8Array V$rcd|cxkr dksJ|J||jjtjd|y)Niz>hr?rIs r writeShortzOTTableWriter.writeShortsB&&--&--& &++dE23rc(|jd|y)NrrLrMs rwriteShortArrayzOTTableWriter.writeShortArrayrOrcb|jjtjd|y)Nz>ir?rIs r writeLongzOTTableWriter.writeLong &++dE23rc(|jd|y)Nr|rLrMs rwriteLongArrayzOTTableWriter.writeLongArrayrOrcd|cxkr dksJ|J||jjtjd|y)Nr>Br?rIs r writeUInt8zOTTableWriter.writeUInt8sBEC&&&& &++dE23rc(|jd|y)NrrLrMs rwriteUInt8ArrayzOTTableWriter.writeUInt8ArrayrOrcd|cxkr dksJ|J||jjtjd|y)Nri>Hr?rIs r writeUShortzOTTableWriter.writeUShortsBE#G#*U*#*U*# &++dE23rc(|jd|y)NrrLrMs rwriteUShortArrayzOTTableWriter.writeUShortArrayrOrcb|jjtjd|y)N>Ir?rIs r writeULongzOTTableWriter.writeULongrWrc(|jd|y)NrrLrMs rwriteULongArrayzOTTableWriter.writeULongArrayrOrcd|cxkr dksJ|J|tjd|}|jj|ddy)Nrz>Lrrr@rr#)rr,rs r writeUInt24zOTTableWriter.writeUInt24sME%I%,u,%,u,% KKe $ !AB% rc4|D]}|j|yr*)rm)rrDr,s rwriteUInt24ArrayzOTTableWriter.writeUInt24Arrays $E   U # $rct|j}t|dk(sJ||jj |yr)rrCrrr#)rtags rwriteTagzOTTableWriter.writeTag s;#h 3x1}!c!} #rcN|jjt||yr*)rr#rrs r writeSubTablezOTTableWriter.writeSubTables .J?@rcZt||||}|jj||S)N)rr,)CountReferencerr#)rr@rtrr,refs rwriteCountReferencez!OTTableWriter.writeCountReferences)UDt5A # rcftj|f|z}|jj|yr*rl)rformatrDrBs r writeStructzOTTableWriter.writeStructs){{VI./ $rc:|jj|yr*)rr#)rrBs r writeDatazOTTableWriter.writeDatas $rcdx}x}x}}|jdk(r|j}n|jdk(r|j}|j}n{t|dd}t|dr |j}|jdk(r$|jj}|j}n#|jdk(r7|jjj}|jj}ndj |j|g}|j}|rH|jd vr:dj |j|g}|j}|r|jd vr:|rh|jdk(r7|jjj}|jj}n"|jj}|j}t |j||||fS) N LookupListLookuprtr repeatIndexSubTable ExtSubTable.)rr)rtrr?rqrjoinrr<)rrrrrrp1s rrz$OTTableWriter.getOverflowErrorRecordsAEEE-E(Y 99 $"..O YY( ""..O ,,MtVX6Ht]+ ,, yyJ&"&++"9"9 $ 0 0 m+"&++"4"4"@"@ $ 7 7 88TYY$9:[[RWW,GG"xx((; @7r-BF>' 4%4%4%4%4%4%! $ A   ! rrOc*eZdZdZddZdZdZdZy)rvz8A reference to a Count value, not a count of references.NcV||_||_||_||j|yyr*)r@rtrsetValue)rr@rtrr,s rrzCountReference.__init__Fs.     MM%  rct|j}|j}|||||<y|||k(s J||||fyr*r@rt)rr,r@rts rrzCountReference.setValueMsI yy ; E$K;%' C$d U)C C'rc4|j|jSr*rr!s rgetValuezCountReference.getValueUszz$))$$rc|j|j}|d}tttd|j |S)Nr)rrr)r@rt packUInt8rrr)rvs rrzCountReference.getCountDataXs9 JJtyy ! 9A :499EaHHrr)r#r$r%r{rrrrr&rrrvrvCsB!D%Irrvc.tjd|S)Nr\rr@r+s rrr_ ;;tU ##rc.tjd|S)Nrarr+s rrrcrrcbd|cxkr dksJ|J|tjd|S)Nrlrfrr+s rrrgs6  # #*U* #*U* # ;;tU ##rchd|cxkr dksJ|J|tjd|ddS)Nrrkrfrrr+s rrrls=  ! !(5( !(5( ! ;;tU #AB ''rceZdZdZdZddZdZedZdZ dZ dd Z d Z d Z d Zd ZddZdZdZdZdZGddeZdeefdZdZy) BaseTablez0Generic base class for all OpenType (sub)tables.c|jjd}|r.|`|j}|`|j ||t ||St |NrD)__dict__getrDrCrAr?AttributeError)rattrrDrCs r __getattr__zBaseTable.__getattr__tsR""8,  99D NN64 (4& &T""rc|jjd}|r"|`|j}|`|j |||r1|j D]}|j j|yyr)rrrDrCrA iterSubTablesr,ry)rrxrDrCsubtables rryzBaseTable.ensureDecompiledsl""8,  99D NN64 (  ..0 9//8 9 rcd|jvr<|jj}|jdj|d<|S|jSr)rr)rrVs r __getstate__zBaseTable.__getstate__sL t}} $MM&&(E"mmH5::yyK'((% :LM ;;!$++s3%)[[ -%*4;;%7 &,DKK%8 $((*J'+~~fdE:'VE$))$xxTXXtU(C '+yyu'EE$))$((,1$)),<tyy)3 > 4 $ MM% & O MM  ' O yy4') s B4HAH I &"II c|jt|dr/t|d }|j|}|xr t|d}nd}|jj }|j D]W}|j s|js|j|j}t|tsI|||j<Yt|drd|_ t|drd|_ t|jdr(|dj|jj |j#||j D]a}|j|j}|j$r|g}t'||j(z }t|j$t*r7t'||j$k(sdJd |j$t'|fz|j$|vrt||j$| n||j$j| |j-|||||j rt|trB|} |j2| _|j7| | j9||j<n6|j;||j|j2} d||j<|js| ||j<|j<rY|j|vrd||j<|j;||j|j2||j} | |d< |j(rt?|j(d|s0 |jA|||||jsS|||j<d|r|`"yy#t.$r(}|j0|jd zfz|_d}~wwxYw#t.$r?}||jjBn |j} |j0| fz|_d}~wwxYw) NpreWriteFormatFrrrTrzexpected %d values, got %dr+z[])#ryrqrrrrisCountrrrtrrvrrrrr writeFormatrrrrrFrrrrr}rrx isLookupTyperwriter#r) rrYrC deleteFormatr@rr,rrZrwrts rrPzBaseTable.compiles  4 $&tX66LMM$'E'CGD(,CL LMM&&(E &&( .D|| 1 1 $)),e^4(-F499%  . 4+ ,&'F # 4 %#F  4>>< 0 < ) )$..*C*C D  &&(? .DII E{{=E Z$((2 dkk3/u:46R E V74[[E)"5$++ZH4;;'00<OOFD%?e^4C#CH$$S)'*||~E$))$ 44UDIItWC'+E$))$$$(+F499%""99E)'+E$))$00499doouTYY7G(+|$88D4$?JJvtUE: $$(-F499%? .B   [!VVtyy4'7&99AFL!7<7H5??33diiDVVtg-AFs05OO6 O3 #O..O36 P>?:P99P>cyr*r&rrDs rrzBaseTable.readFormatS rcyr*r&rhs rrzBaseTable.writeFormatVrrc&|r|n|jj}|g}t|dr|d|jfgz}|j |||j |j |||j||j y)Nr)rr#rqrbegintagnewlinernendtag)r xmlWriterrCrurt tableNames rrozBaseTable.toXMLYs Ddnn&=&= =E 4 "h 455E9e, It$#rc |jD]}|jrMt||jg}t |D]'\}}|j ||||jd|fg)\|j r!t|j dt|st||jd}|j ||||jgy)Nindex) rrr?rtrxmlWriterrvars)rrrCrr,r|rs rrnzBaseTable.toXML2es&&( ED{{dii4(/TGAtMM)T4gq\NST88D4d$D$))T iudiiD Erc8 |j|}|j|||}|jDt ||j d}|g}t ||j ||j|yt ||j |y#t$rwxYwr*)rrxmlReadrr?rtrr#)rrtrurvrCrr,seqs rrrzBaseTable.fromXMLvs **40D UGT2 ;; "$ 40C{dii- JJu  D$))U +   s B Bc>|j|}|tur|S| Sr*r r s rrzBaseTable.__ne__rrct|t|k7rtS|j|j|j|jk(Sr*)rcrryrrs rrzBaseTable.__eq__sC :e $! !   }}..rc:eZdZUdZeed<ded<dZeeed<y)BaseTable.SubTableEntryzSee BaseTable.iterSubTables()rtrr,Nr) r#r$r%r{r __annotations__rr rr&rr SubTableEntryrs+ #x}#rrreturnc#KjD]q}|jtd}|t|trj |Dt|t sUfdt|DEd{sy7w)a7Yield (name, value, index) namedtuples for all subtables of current table. A sub-table is an instance of BaseTable (or subclass thereof) that is a child of self, the current parent table. The tuples also contain the attribute name (str) of the of parent table to get a subtable, and optionally, for lists of subtables (i.e. attributes associated with a converter that has a 'repeat'), an index into the list containing the given subtable value. This method can be useful to traverse trees of otTables. Nc3lK|]+\}}t|trj||-yw))rN)rrr).0r|rrtrs r z*BaseTable.iterSubTables..s91!!Y/&&tQa&8s14)rrtr?rrrrr)rrr,rts` @rrzBaseTable.iterSubTabless&&( D99DD$-E}%+((u55E4( )% 0 sA%B *B B B c,t|jSr*)getVariableAttrsrr!s rrzBaseTable.getVariableAttrss//rrr*r)r#r$r%r{rryr classmethodrrrrsrArPrrrornrrrrr rr rrr&rrrrqs: # 9  +;6(TcJ   E",$B/$ $x 640rrcFeZdZdZedZdZdZdZdZ d dZ d Z y) FormatSwitchingBaseTablezvMinor specialization of BaseTable, for tables that have multiple formats, eg. CoverageFormat1 vs. CoverageFormat2.ctSr*)r)rrDs rrz&FormatSwitchingBaseTable.getRecordSizesrc |j}|jj|jgS#t$rgcYSwxYwr*)rrrr)rfmts rrz&FormatSwitchingBaseTable.getConverterssE ++C""4;;33  I  s 4 AAc:|j|j|Sr*)rrrs rrz+FormatSwitchingBaseTable.getConverterByNames$$T[[1$77rc.|j|_yr*)rrrs rrz#FormatSwitchingBaseTable.readFormats'') rc:|j|jyr*)rbrrhs rrz$FormatSwitchingBaseTable.writeFormats4;;'rNc6tj|||||yr*)rro)rrrCrurts rrozFormatSwitchingBaseTable.toXMLsiud;rcBt|j|jSr*)rrrr!s rrz)FormatSwitchingBaseTable.getVariableAttrss <BCCDs #rrrcrt|ts t|t|tr*|td|j|j |}n |j }d|vryi}|j D]\}}|j}||||<tt||jS)zReturn sequence of variable table field names (can be empty). Attributes are deemed "variable" when their otData.py's description contain 'VarIndexBase + {offset}', e.g. COLRv1 PaintVar* tables. z''fmt' is required for format-switching VarIndexBaser&)key) issubclassrrrr#rrgetVarIndexOffsetrsortedr)rrrvarAttrsrtrrs rrrs c9 %n#/0 ;Ecll^TU U))#. )) Z'H &&($ d'')  #HTN$ h&:&:; <? @ ,=a,B 7 (D$&tT" t,%&&f~6  7    y+ 6    &1 C"l+ &&y$T&B C   Y '        ; 7    rcHddlm}|jD]\}}t||t ||D]i}t |t s|\}}}t||} |D]-} t | t s| \} } } | j| | | |/t||| kyr4) r=r:rrrrrr?rr)rrtrurvrCr:krelementr,elem2name2attrs2content2s rrrzValueRecord.fromXMLsKKM %DAq D!SV $ % 'Ggu-#* D%+GHd+-E  =!%/*/'vx eVXt<  = D$ & 'rc>|j|}|tur|S| Sr*r r s rrzValueRecord.__ne__rrcnt|t|k7rtS|j|jk(Sr*)rcrrrs rrzValueRecord.__eq__s+ :e $! !}}..rrr*) r#r$r%rrCrErorrrrr&rrr5r5is& 0  4'"B/rr5r*);fontTools.configrfontTools.misc.textToolsrrrenumrrrrlogging functoolsr typingr r r r getLoggerr#rKrM uharfbuzzracallabler?rNrJobjectrrr(r2r7rr@itemsizer>rrOrvrrrrrrrrr rr rr'r,rBr.r5r&rrras$3& 88g!  gb(D9:N 8*,B CD & 0 Y G*l5|l5` ;6;;sA 1$$$u{{3  A%L'LL%q;Fq;h 7V 7x Fx v IVI8$$$ ( F0F0R !=y!=H'$<'' * D =)=(3-=5:= =B, # 0*0*fO/&O/g*  sE??FF