U
    »mœd  ã                   @   sN   d dl Z d dlmZmZ d dlT d dlmZ ddd„ZedkrJe  	eƒ ¡ dS )	é    N)Ú
TTLibErrorÚTTLibFileIsCollectionError)Ú*)ÚTTCollectionc              	   C   s–  ddl m} | dkr"tjdd… } ddl}|jdddd�}|jd	d	d
dd� |jdddddd� |jddddd� |jddddd� |jddddd� |jdd dd!d"� | | ¡}|jdk	rÆt	|jƒnd}|j
}|j}|j}g }	|jD ]P}
zt|
||d#�}|	 |¡ W qæ tk
�r4   t|
|d$�}|	 |j¡ Y qæX qæ|dk	�r’t|	ƒdk�rj||	d _|	d  |¡ n(|dk	�r|td%ƒ‚tƒ }|	|_| |¡ dS )&aõ  Open/save fonts with TTFont() or TTCollection()

      ./fonttools ttLib [-oFILE] [-yNUMBER] files...

    If multiple files are given on the command-line,
    they are each opened (as a font or collection),
    and added to the font list.

    If -o (output-file) argument is given, the font
    list is then saved to the output file, either as
    a single font, if there is only one font, or as
    a collection otherwise.

    If -y (font-number) argument is given, only the
    specified font from collections is opened.

    The above allow extracting a single font from a
    collection, or combining multiple fonts into a
    collection.

    If --lazy or --no-lazy are give, those are passed
    to the TTFont() or TTCollection() constructors.
    r   )ÚconfigLoggerNé   zfonttools ttLibz/Open/save fonts with TTFont() or TTCollection()a"  
		If multiple files are given on the command-line,
		they are each opened (as a font or collection),
		and added to the font list.

		The above, when combined with -o / --output,
		allows for extracting a single font from a
		collection, or combining multiple fonts into a
		collection.
		)ÚdescriptionÚepilogÚfontr   z
Font file.)ÚmetavarÚnargsÚhelpz-oz--outputÚFILEzOutput file.)r   Údefaultr   z-yÚNUMBERéÿÿÿÿz%Font number to load from collections.z--lazyÚ
store_truezLoad fonts lazily.)Úactionr   r   z	--no-lazyÚlazyÚstore_falsezLoad fonts immediately.)Údestr   r   z--flavorÚflavorz)Flavor of output font. 'woff' or 'woff2'.)r   r   r   )Ú
fontNumberr   )r   z"Cannot set flavor for collections.)Z	fontToolsr   ÚsysÚargvÚargparseÚArgumentParserÚadd_argumentÚ
parse_argsÚyÚintÚoutputr   r   r
   ZTTFontÚappendr   r   ÚextendÚfontsÚlenÚsaver   )Úargsr   r   ÚparserÚoptionsr   ZoutFiler   r   r$   Úfr
   Z
collection© r+   úQ/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/fontTools/ttLib/__main__.pyÚmain   s~    ý    ÿ   ÿ   ÿ   ÿü




r-   Ú__main__)N)
r   ZfontTools.ttLibr   r   ZfontTools.ttLib.ttFontZfontTools.ttLib.ttCollectionr   r-   Ú__name__Úexitr+   r+   r+   r,   Ú<module>   s   
\