§
    ý<ã`  ã                   óN   — d Z ddlmZ ddlmZmZ d„ Zd„ Z G d„ de¦  «        ZdS )	z0ttLib.macUtils.py -- Various Mac-specific stuff.é    )ÚBytesIO)ÚResourceReaderÚResourceErrorc                 óœ   — 	 t          | ¦  «        }|                     d¦  «        }|                     ¦   «          |S # t          $ r g cY S w xY w)z;Determine whether a file has a 'sfnt' resource fork or not.Úsfnt)r   Ú
getIndicesÚcloser   )ÚpathÚreaderÚindicess      ú8lib/python3.11/site-packages/fontTools/ttLib/macUtils.pyÚgetSFNTResIndicesr      s]   € ðÝ˜$ÑÔ€&Ø×Ò˜fÑ%Ô%€'Ø‡,‚,.„.€.Ø	€.øÝð ð ð Ø	€)€)€)ðøøøs   ‚9< ¼AÁ
Ac                 ó  — ddl m} g }t          | ¦  «        }|s)|                     |                     | ¦  «        ¦  «         nH|D ]+}|                     |                     | |¦  «        ¦  «         Œ,|s|                     d| z  ¦  «        ‚|S )züGiven 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.
	r   ©ÚttLibzno fonts found in file '%s')Ú	fontToolsr   r   ÚappendÚTTFontÚ
TTLibError)r
   r   ÚfontsÚsfntsÚindexs        r   ÚopenTTFontsr      s¬   € ð ÐÐÐÐÐØ	€Ý	˜4Ñ	 Ô	 €Øð @Ø‡,‚,ˆu|Š|˜DÑ!Ô!Ñ"Ô"Ð"Ð"àð +ð +€eØ‡<‚<—’˜T 5Ñ)Ô)Ñ*Ô*Ð*Ð*Ø	ð @Ø	×	Ò	Ð7¸$Ñ>Ñ	?Ô	?Ð?Ø€ó    c                   ó"   ‡ — e Zd ZdZˆ fd„Zˆ xZS )ÚSFNTResourceReaderz3Simple read-only file wrapper for 'sfnt' resources.c                 óˆ  •— ddl m} t          |¦  «        }t          |t          ¦  «        r|                     d|¦  «        }n|                     d|¦  «        }|€|                     d|z  ¦  «        ‚|                     ¦   «          || _	        t          t          | ¦  «                             |j        ¦  «         || _        d S )Nr   r   r   zsfnt resource not found: %s)r   r   r   Ú
isinstanceÚstrÚgetNamedResourceÚgetIndResourcer   r	   ÚrsrcÚsuperr   Ú__init__ÚdataÚname)Úselfr
   Úres_name_or_indexr   r   r"   Ú	__class__s         €r   r$   zSFNTResourceReader.__init__(   sÃ   ø€ ØÐÐÐÐÐÝ˜$ÑÔ€&ÝÐ!¥3Ñ'Ô'ð ;Ø
×
!Ò
! &Ð*;Ñ
<Ô
<€4€4à
×
Ò
 Ð(9Ñ
:Ô
:€4Ø	€\Ø	×	Ò	Ð7Ð:KÑKÑ	LÔ	LÐLØ‡,‚,.„.€.Ø€$„)ÝÕ˜DÑ!Ô!×*Ò*¨4¬9Ñ5Ô5Ð5Ø€$„)€)€)r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r$   Ú__classcell__)r)   s   @r   r   r   $   s>   ø€ € € € € à:Ð:ðð ð ð ð ð ð ð ð r   r   N)	r-   Úior   ÚfontTools.misc.macResr   r   r   r   r   © r   r   ú<module>r2      s‡   ðØ 6Ð 6Ø Ð Ð Ð Ð Ð Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?ðð ð ðð ð ð&ð ð ð ð ˜ñ ô ð ð ð r   