U
    Q»{j}  ã                   @   sR   d dl Z d dlmZmZmZ d dlT d dlmZ ddd„Ze	dkrNe  
eƒ ¡ dS )	é    N)ÚOPTIMIZE_FONT_SPEEDÚ
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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)d*d"d+d$� |jd,d-d"d.d$� |jd/dd0d1� | | ¡}|jdk	�rt	|jƒnd}|j
}|j}|j}|j}	|j}
|j}|j}g }|jD ]f}z0t||
|||d2�}|�rp||jt< | |¡ W n. tk
�rª   t||d3�}| |j¡ Y nX �qH|	dk�rì|d4k�rÌd
g}	n |�rèd5d6d7h | ¡ ¡}	ng }	|D ]>}d8|	k�r| ¡  d
|	k�r|	n| ¡ D ]}||  �q�qð|dk	�rŠt|ƒdk�rb||d _|d  |¡ n(|dk	�rttd9ƒ‚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-tz--tableÚtableÚappendzTables to decompile.)r   Úactionr   z-oz--outputÚFILEzOutput file.)r   Údefaultr   z-yÚNUMBERéÿÿÿÿz%Font number to load from collections.z--lazyÚ
store_truezLoad fonts lazily.)r   r   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   z--no-recalc-timestampÚrecalcTimestampz,Keep the original font 'modified' timestamp.z-bÚrecalcBBoxeszGDon't recalc glyph bounding boxes: use the values in the original font.z--optimize-font-speedz‚Enable optimizations that prioritize speed over file size. This mainly affects how glyf table and gvar / VARC tables are compiled.)r   r   )r   r   Ú
fontNumberr   )r   FZglyfZgvarZVARCZ
GlyphOrderz"Cannot set flavor for collections.) Z	fontToolsr   ÚsysÚargvÚargparseÚArgumentParserÚadd_argumentÚ
parse_argsÚyÚintÚoutputr   r   r   r   r   Zoptimize_font_speedr   ZTTFontÚcfgr   r   r   r   ÚextendÚfontsÚintersectionÚkeysZgetGlyphOrderÚlenÚsaver   )Úargsr   r    ÚparserÚoptionsr   ZoutFiler   r   Ztablesr   r   ZoptimizeFontSpeedr)   Úfr   Z
collectionr   © r2   úW/var/www/html/bwave/python/venv/lib/python3.8/site-packages/fontTools/ttLib/__main__.pyÚmain   sÜ    ý    ÿ    ÿ   ÿ   ÿ   ÿüüüü

û






r4   Ú__main__)N)r   ZfontTools.ttLibr   r   r   ZfontTools.ttLib.ttFontZfontTools.ttLib.ttCollectionr   r4   Ú__name__Úexitr2   r2   r2   r3   Ú<module>   s   
 