)EjNdZddlmZddlmZmZdZdZGddeZdS) z0ttLib.macUtils.py -- Various Mac-specific stuff.)BytesIO)ResourceReader ResourceErrorc t|}|d}||S#t$rgcYSwxYw)z;Determine whether a file has a 'sfnt' resource fork or not.sfnt)r getIndicescloser)pathreaderindicess JC:\PYTHON\MyICR_Suite\python\Lib\site-packages\fontTools/ttLib/macUtils.pygetSFNTResIndicesrs]%%##F++   s9< A  A cddlm}g}t|}|s)|||nH|D]+}||||,|s|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 I U\\$''(((( 4 4E LLdE22 3 3 3 3 I""#@4#GHH H Lc"eZdZdZfdZxZS)SFNTResourceReaderz3Simple read-only file wrapper for 'sfnt' resources.cddlm}t|}t|tr|d|}n|d|}||d|z|||_ tt| |j ||_dS)Nrrrzsfnt resource not found: %s)rrr isinstancestrgetNamedResourcegetIndResourcerr rsrcsuperr__init__dataname)selfr res_name_or_indexrr r" __class__s r r$zSFNTResourceReader.__init__)s######%% ' - - D**63DEEDD((1BCCD <""#@CT#TUU U    $''00;;; r)__name__ __module__ __qualname____doc__r$ __classcell__)r)s@r rr&s>==         rrN) r-iorfontTools.misc.macResrrrrrrr r2s66????????(r