a
    w=ic                     @   s   d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 d dlZd dlZd dlZedZddd	Zed
kree  dS )    )TTFont)addOpenTypeFeaturesBuilder)FeatureLibError)configLogger)makeOutputFileNameNzfontTools.feaLibc              
   C   sT  t jdd}|jdddd |jddd	d |jd
ddddd |jdddtjddd |jddddd |jdddddd  |jd!d"dd# || }g d$}t|tt|d% |j	 d& |j
pt|j}td'|  t|j}zt||j|j|jd( W nD tyD } z*|jr t| td% W Y d)}~n
d)}~0 0 || d)S )*z8Add features from a feature file (.fea) into an OTF fontz8Use fontTools to compile OpenType feature files (*.fea).)description	input_feaZFEATURESzPath to the feature file)metavarhelp
input_fontZ
INPUT_FONTzPath to the input fontz-oz--outputoutput_fontZOUTPUT_FONTzPath to the output font.)destr
   r   z-tz--tablesZ	TABLE_TAG+z!Specify the table(s) to be built.)r
   choicesnargsr   z-dz--debug
store_truez/Add source-level debugging information to font.)actionr   z-vz	--verbosez?Increase the logger verbosity. Multiple -v options are allowed.countr   )r   r   defaultz--tracebackzshow traceback for exceptions.)r   r   )WARNINGINFODEBUG   )levelzCompiling features to '%s')tablesdebugN)argparseArgumentParseradd_argumentr   ZsupportedTables
parse_argsr   minlenverboser   r   r   loginfor   r   r	   r   r   r   	tracebackerrorsysexitsave)argsparseroptionslevelsr   Zfonte r0   j/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/fontTools/feaLib/__main__.pymain   sp    



 r2   __main__)N)ZfontTools.ttLibr   ZfontTools.feaLib.builderr   r   ZfontTools.feaLib.errorr   Z	fontToolsr   ZfontTools.misc.cliToolsr   r(   r   logging	getLoggerr$   r2   __name__r)   r0   r0   r0   r1   <module>   s   

?