
    <`	                         d dl mZ d dlmZ d dlmZ d dlmZmZ d	dZ	e
dk    rXd dlZ eej                  dk    r ej         e	                       d dlZ ej         ej                    j                   dS dS )
    )RawTextHelpFormatter)dedent)TTFont)compactGPOS_COMPACT_MODE_DEFAULTNc           
         ddl m} ddlm}  |dt          j        t                    }|                    d           |                    ddd	d
d           |                    dt          dt           d          t          t                    t          t          d                    t                     |                    d          }|                    dddd           |                    dddd           |                    |           } ||j        rdn
|j        rdnd           t#          |j                  }t'          |t)          |j                             |                    |j        p|j                   d
S ) z/Optimize the layout tables of an existing font.r   )ArgumentParser)configLoggerzotlLib.optimize)progdescriptionformatter_classfontz-o
OUTPUTFILEoutfileNzoutput file)metavardestdefaulthelpz--gpos-compact-modea              GPOS Lookup type 2 (PairPos) compaction mode:
                0 = do not attempt to compact PairPos lookups;
                1 to 8 = create at most 1 to 8 new subtables for each existing
                    subtable, provided that it would yield a 50%% file size saving;
                9 = create as many new subtables as needed to yield a file size saving.
            Default: a  .

            This compaction aims to save file size, by splitting large class
            kerning subtables (Format 2) that contain many zero values into
            smaller and denser subtables. It's a trade-off between the overhead
            of several subtables versus the sparseness of one big subtable.

            See the pull request: https://github.com/fonttools/fonttools/pull/2326
            
   )r   r   choicestypeF)requiredz-vz	--verbose
store_truezRun more verbosely.)actionr   z-qz--quietzTurn verbosity off.DEBUGERRORINFO)level)argparser	   	fontToolsr
   main__doc__r   add_argumentr   r   intlistrangeadd_mutually_exclusive_group
parse_argsverbosequietr   r   r   strgpos_compact_modesaver   )argsr	   r
   parserlogging_groupoptionsr   s          Blib/python3.11/site-packages/fontTools/otlLib/optimize/__init__.pyr!   r!      s   ''''''&&&&&&^!2^rsssF

lD}      0  
 
" -..U2YY+    . 777GGMk,5J     i3H     %%GL!/Sww'-/SwwV    ',DD#g/00111IIgo-.....    __main__   )N)r   r   textwrapr   fontTools.ttLibr   fontTools.otlLib.optimize.gposr   r   r!   __name__syslenargvexitdoctesttestmodfailed r3   r2   <module>rB      s    ) ) ) ) ) )       " " " " " " M M M M M M M M1/ 1/ 1/ 1/j zJJJ
s38}}qNNNCH_W_%&&&&& r3   