o
    h}                     @   sV   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r)e 
e  dS dS )	    N)OPTIMIZE_FONT_SPEED
TTLibErrorTTLibFileIsCollectionError)*)TTCollectionc              	   C   sz  ddl m} | du 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urt	|jnd}|j
}|j}|j}|j}	|j}
|j}|j}g }|jD ].}zt||
|||d2}|r||jt< || W q ty   t||d3}||j Y qw |	du r|d4u rd
g}	n|rh d5| }	ng }	|D ]}d6|	v r|  d
|	vr|	n| D ]}||  qq|dur;t|dkr%||d _|d | dS |dur.td7t }||_|| dS dS )8a  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NUMBERz%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-speedzEnable 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   F>   VARCglyfgvar
GlyphOrderz"Cannot set flavor for collections.) 	fontToolsr   sysargvargparseArgumentParseradd_argument
parse_argsyintoutputr   r   r   r   r   optimize_font_speedr   TTFontcfgr   r   r   r   extendfontsintersectionkeysgetGlyphOrderlensaver   )argsr   r%   parseroptionsr   outFiler   r   tablesr   r   optimizeFontSpeedr0   fr   
collectionr    r>   l/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/fontTools/ttLib/__main__.pymain   s   







r@   __main__)N)r#   fontTools.ttLibr   r   r   fontTools.ttLib.ttFontfontTools.ttLib.ttCollectionr   r@   __name__exitr>   r>   r>   r?   <module>   s    
 