+
    f7i@   c                   sr   ^ RI Ht ^ RIt ^ RIHtHtHt ^ RIHtH	t	 ^ RI
Ht ^ RIt ^ RIHt ^ RIHt ^ RIt^ RIt]P&                  ! R4      t]! ]P&                  ! ]R	,           4      ]P,                  R
7      t ! R R]4      t. ROt]! R4      RR l4       t]R8X  d   ]P8                  ! ]! 4       4       R# R# )i    )ttLibN)computeMegaGlyphOrdercomputeMegaCmaprenameCFFCharStrings)layoutPreMergelayoutPostMerge)Options)Timer)reducezfontTools.mergez.timer)loggerlevelc                   sL   a  ] tR t^t o RtR
R ltR tR tR tR t	R t
R	tV tR# )MergeraN  Font merger.

This class merges multiple files into a single OpenType font, taking into
account complexities such as OpenType layout (``GSUB``/``GPOS``) tables and
cross-font metrics (for example ``hhea.ascent`` is set to the maximum value
across all the fonts).

If multiple glyphs map to the same Unicode value, and the glyphs are considered
sufficiently different (that is, they differ in any of paths, widths, or
height), then subsequent glyphs are renamed and a lookup in the ``locl``
feature will be created to disambiguate them. For example, if the arguments
are an Arabic font and a Latin font and both contain a set of parentheses,
the Latin glyphs will be renamed to ``parenleft.1`` and ``parenright.1``,
and a lookup will be inserted into the to ``locl`` feature (creating it if
necessary) under the ``latn`` script to substitute ``parenleft`` with
``parenleft.1`` etc.

Restrictions:

- All fonts must have the same units per em.
- If duplicate glyph disambiguation takes place as described above then the
  fonts must have a ``GSUB`` table.

Attributes:
        options: Currently unused.
Nc                s6    V'       g   \        4       pWn        R # N)r   options)selfr      &&?/usr/lib64/python3.14/site-packages/fontTools/merge/__init__.py__init__ZMerger.__init__5   s    iG    c                s    V Uu. uF  p\         P                  ! V4      NK  	  pp\        W14       F(  w  rBW$n        VR ,          P	                  ^4      Vn        K*  	  V# u upi )Zname)r    TTFontzipZ_merger__fontfileZgetDebugNameZ_merger__name)r   	fontfilesZfontfilefontsfonts   &&   r   
_openFontsZMerger._openFonts;   sZ    8AB	Hh'	B!%3ND%-"!%f!:!:1!=D 4 	 Cs   Ac           
     sR   V P                  V4      pV Uu. uF  p\        VP                  4       4      NK  	  pp\        W4       V^ ,          P                  pV P                  V4      p\        W$4       F2  w  r6VP                  V4       RV9   g   K  \        WVR,          4       K4  	  V Uu. uF  q3R,          NK  	  ppV Uu. uF  p/ NK  	  upV n        \        W4       \        P                  ! VR7      p	V	P                  V P                  4       V F  pV P                  V4       K  	  W n        \        \         P"                  R V 4       \!        4       4      p
V
P%                  R4       \'        V
4       F  pWP(                  P*                  9   d   K  \-        RV,          4      ;_uu_ 4        V Uu. uF  q3P/                  V\0        4      NK  	  pp\2        P5                  RV4       \        P6                  ! V4      pV! V4      P9                  W4      pV\0        Jd"   VRJd   WV&   \2        P5                  R	V4       M\2        P5                  R
V4       RRR4       K  	  V =V =V P;                  V	4       V	# u upi u upi u upi u upi   + '       g   i     EK+  ; i)zMerges fonts together.

Args:
        fontfiles: A list of file names to be merged

Returns:
        A :class:`fontTools.ttLib.TTFont` object. Call the ``save`` method on
        this to write it out to an OTF file.
zCFF Zcmap)sfntVersionc              3   sT   "   T F  p\        VP                  4       4      x  K   	  R # 5ir   )listkeys).0r      & r   	<genexpr>ZMerger.merge.<locals>.<genexpr>i   s     $I54T$))+%6%65s   &(Z
GlyphOrderz
merge '%s'zMerging '%s'.FzMerged '%s'.zDropped '%s'.N)r   r   ZgetGlyphOrderr   r   r   ZsetGlyphOrderr   duplicateGlyphsPerFontr   r    r   
glyphOrder	_preMerger   r   setunionZremoveZsortedr   Zdrop_tablestimerZgetNotImplementedloginfoZgetTableClassmerge
_postMerge)r   r   r   r   ZglyphOrdersr   r    ZcmapsZ_ZmegaZallTagsZtagtablesZclazztables   &&             r   r(   ZMerger.mergeB   s)    	*>CDedtD..01eDd0 Ah** 	* #E 7Dz*~$TtF|D !8
 +00%$f%038&95ar5&9#$||44??+DNN4   
$I5$I35Q|$'?Cll...|c)**DIJED((37EJ#.++C0c
((6 .53E %IHH^S1HH_c2 +*	 #$ 'Jg E 1&9& K +**s0   "J .JJ
4J9J
BJJJ&c           	     s  a \         P                  ! \        4       .R  V 4       O5!  pV FZ  o\        P                  RS4        VS,          pT\        J d   K/  T! T3R lT 4       4      pT\        Jg   KM  \        TST4       K\  	  V#   \         dD     TR,          p LT  \         d)    \        RS: RTP                  P                  : 24      hi ; ii ; i)c              3   sj   "   T F)  q\         Jg   K  \        V4      P                  4       x  K+  	  R # 5ir   )r%   Zvarsr   )r   r+   r   r   r   &Merger.mergeObjects.<locals>.<genexpr>   s(     TfU^8S d5k  fs   3!3z %sZ*zDon't know how to merge key z
 of class c              3   sF   <"   T F  p\        VS\        4      x  K  	  R # 5ir   )Zgetattrr%   )r   r+   keys   & r   r   r,      s     WPVuwuc>BBPVs   !)
r"   r#   r&   r'   ZKeyErrorZ	ExceptionZ	__class____name__r%   Zsetattr)r   ZreturnTableZlogicr*   ZallKeysZ
mergeLogicZvaluer-   s   &&&&   @r   mergeObjectsZMerger.mergeObjects   s     ))E
TfT
 CHHUC 	"3Z
 ^+WPVWWEN*S%0! $   !&sJ # 5 5 > >@ s   	BC	B""3CCc                s    \        V4       R # r   )r   r   r   r   r   r!   ZMerger._preMerge   s
    tr   c                s^    \        V4       R V9   d   VR ,          P                  V4       R# R# )zOS/2N)r   ZrecalcAvgCharWidthr0   r   r   r)   ZMerger._postMerge   s*    T> L++D1 r   )r   r   r   r   )r.   Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r   r(   r/   r!   r)   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s/     6AF82 2r   r   z%make one with everything (TOTAL TIME)c                s   ^ RI Hp V f   \        P                  R,          p \	        4       pVP                  V 4      p . pVP                  '       d{   \        VP                  4      ;_uu_ 4       pVP                  4        Uu. uF:  pVP                  4       P                  R4      '       d   K*  VP                  4       NK<  	  ppRRR4       V  F  pVP                  V4       K  	  \        V4      ^8  Ed   \        R\        P                  R7       \        R\        P                  R7       \        R\        P                  R7       \        R	\        P                  R7       \        R
\        P                  R7       \        R\        P                  R7       \        R\        P                  R7       \        R\        P                  R7       \        R\        P                  R7       \        R\        P                  R7       ^# T! VP                   '       d   \"        P$                  M\"        P&                  R7       VP(                  '       d/   \*        P,                  P/                  \"        P0                  4       MR\*        P,                  n        \5        VR7      pVP7                  V4      pVP8                  '       d   VP;                  VP8                  4       \+        R4      ;_uu_ 4        VP=                  VP>                  4       RRR4       R# u upi   + '       g   i     ELb; i  + '       g   i     R# ; i)zMerge multiple fonts into one)configLoggerN:i   NNZ#zzusage: fonttools merge [font1 ... fontN] [--input-file=filelist.txt] [--output-file=merged.ttf] [--import-file=tables.ttx])ZfilezN                                   [--drop-tables=tags] [--verbose] [--timing]Z z- font1 ... fontN              Files to merge.zp --input-file=<filename>      Read files to merge from a text file, each path new line. # Comment lines allowed.zM --output-file=<filename>     Specify output file name (default: merged.ttf).za --import-file=<filename>     TTX file to import after merging. This can be used to set metadata.zY --drop-tables=<table tags>   Comma separated list of table tags to skip, case sensitive.z: --verbose                    Output progress information.z5 --timing                     Output progress timing.)r
   T)r   zcompile and save font) 	fontToolsr1   sysZargvr   Z
parse_optsZ
input_fileZopenZ	readlinesZlstripZ
startswithZstripZappendZlenZprintZstderrZverboseloggingINFOZWARNINGZtimingr$   r	   ZsetLevelZDEBUGZdisabledr   r(   Zimport_fileZ	importXMLZsaveZoutput_file)	Zargsr1   r   r   Z	inputfileZlineZgZmergerr   s	   &        r   mainr6      sF    '|xx|iGd#DI'$$%% &//11D{{}//4 

1   &   9~ I	
 	\	
 	bszz"=CJJO~	
 	[	
 	o	
 	g	
 	H	
 	ECJJWww||GOOL~~~gmm, $G$F<<	"Dw**+	&	'	'		'%%& 
(	'm &%%n 
(	'	's0   .L'L-LL1L0LL-	0M	Z__main__)r   r   r6   r   )r2   r    ZfontTools.merge.baseZfontTools.merge.cmapr   r   r   ZfontTools.merge.layoutr   r   ZfontTools.merge.optionsr   ZfontTools.merge.tablesZfontTools.misc.loggingToolsr   Z	functoolsr   r3   r4   Z	getLoggerr&   r.   r5   r$   Zobjectr   Z__all__r6   Zexit) r   r   <module>r7      s   
   
 C +  -  
  )*W&&x(':;7<<PQ2V Q2h ( ./C' 0C'L zHHTV r   