L iFdZddlmZddlmZmZdZdZGddeZy) z0ttLib.macUtils.py -- Various Mac-specific stuff.)BytesIO)ResourceReader ResourceErrorc t|}|jd}|j|S#t$rgcYSwxYw)z;Determine whether a file has a 'sfnt' resource fork or not.sfnt)r getIndicescloser)pathreaderindicess ^/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/fontTools/ttLib/macUtils.pygetSFNTResIndicesrsC%##F+   s -0 >>cddlm}g}t|}|s"|j|j ||S|D]#}|j|j ||%|s|j d|z|S)aGiven a pathname, return a list of TTFont objects. In the case of a flat TTF/OTF file, the list will contain just one font object; but in the case of a Mac font suitcase it will contain as many font objects as there are sfnt resources in the file. rttLibzno fonts found in file '%s') fontToolsrrappendTTFont TTLibError)r rfontssfntsindexs r openTTFontsrs|  E d #E  U\\$'( L  4E LLdE2 3 4""#@4#GH H Lc"eZdZdZfdZxZS)SFNTResourceReaderz3Simple read-only file wrapper for 'sfnt' resources.c4ddlm}t|}t|tr|j d|}n|j d|}||jd|z|j||_ tt|3|j||_y)Nrrrzsfnt resource not found: %s)rrr isinstancestrgetNamedResourcegetIndResourcerr rsrcsuperr__init__dataname)selfr res_name_or_indexrr r" __class__s r r$zSFNTResourceReader.__init__)s#% ' -**63DED((1BCD <""#@CT#TU U    $0; r)__name__ __module__ __qualname____doc__r$ __classcell__)r)s@r rr&s=  rrN) r-iorfontTools.misc.macResrrrrrrr r2s$6?(r