+
    f7i  c                   s
   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
t
^RIHtHt Rt ^ RIt]P&                  ! R4      tR tR tRR ltR	 tR
 tRR ltR#   ] d     ^ RIt L8  ] d   t RtA LERtAii ; ii ; i)i    N)closing)partial)font_to_quadraticfonts_to_quadraticzfontTools.cu2quc                  sR     \         P                  ! 4       #   \         d     ^# i ; i)i   )mpZ	cpu_countZNotImplementedError     :/usr/lib64/python3.14/site-packages/fontTools/cu2qu/cli.py
_cpu_countr      s%    ||~ s    &&c                 s    \        \        P                  R 4      '       d    \        P                  P                  V 4      # \        P                  ! V 4      # )open)Zhasattr
ufo_moduleZFontr	   )paths   &r   open_ufor       s7    z''##D))??4  r   c                 s   \        V 4      p\        P                  R V 4       \        V3/ VB '       dD   \        P                  RV4       V'       d   VP	                  V4       R# VP	                  4        R# V'       d   \        W4       R# R# )zConverting curves for %s	Saving %sN)r   loggerinfor   save	_copytree)
input_pathoutput_pathkwargsufos   &&, r   _font_to_quadraticr   &   sa    
:
C
KK*J7'''K-HH[!HHJ	** 
r   c                 sn   \         P                  P                  \         P                  P                  \         P                  P	                  V 4      4      4      p \         P                  P                  \         P                  P                  \         P                  P	                  V4      4      4      pW8H  # N)osr   ZnormcaseZabspathZrealpath)Zpath1Zpath2   &&r   	_samepathr   3   sj    GGRWW__RWW-=-=e-DEFEGGRWW__RWW-=-=e-DEFE>r   c                 s    \        W4      '       d   \        P                  R 4       R# \        P                  P                  V4      '       d   \        P                  ! V4       \        P                  ! W4       R# )z6input and output paths are the same file; skipped copyN)	r   r   Zdebugr   r   existsshutilZrmtreeZcopytree)r   r   r   r   r   r   :   sH    ))MN	ww~~k""k"
OOJ,r   c                s|
   \         P                  ! RR7      pVP                  RR\        P                  R7       VP                  RRRR	R
7       VP                  RRR^ R7       VP                  RR\
        RRRR7       VP                  RRRRRR7       VP                  RRRRR7       VP                  4       pVP                  R R!RR"R#7       VP                  R$R%\        R&^\        4       R'R(R)7       VP                  4       pVP                  R*R+RR,R-R.7       VP                  R/R0RR1R2R.7       VP                  V 4      p\        f   VP                  R34       VP                  '       g   R4pMVP                  ^8X  d   R5pMR6p\        P                  ! VR77       \        VP                   4      ^8  d$   VP"                  '       d   VP                  R84       VP$                  '       d   VP$                  p\&        P(                  P+                  V4      '       g   \&        P,                  ! V4       M=\&        P(                  P/                  V4      '       g   VP                  R9V,          4       VP                    Uu. uF@  p\&        P(                  P1                  V\&        P(                  P3                  V4      4      NKB  	  ppM=VP"                  '       d   VP"                  .pMR.\        VP                   4      ,          p\5        VP                  ^ 8  VP6                  VP8                  VP:                  '       d   RMR:R;7      p	VP<                  '       d   \>        PA                  R<4       VP                    U
u. uF  p
\C        V
4      NK  	  pp
\E        V3/ V	B '       dX   \G        W4       FF  w  r\>        PA                  R=V4       V'       d   VPI                  V4       K6  VPI                  4        KH  	  R# \G        VP                   V4       F  w  rV'       g   K  \K        W4       K  	  R# VPL                  ^8  d*   \O        \        VP                   4      VPL                  4      M^pV^8  d   \Q        \R        3/ V	B p\>        PA                  R>V4       \U        \V        PX                  ! V4      4      ;_uu_ 4       pVP[                  V\G        VP                   V4      4       RRR4       R# \G        VP                   V4       F  w  r\S        W3/ V	B  K  	  R# u upi u up
i   + '       g   i     R# ; i)?z1Convert a UFO font from cubic to quadratic curvesZcu2qu)Zprogz	--versionversion)actionr   infilesZ+ZINPUTz%one or more input UFO source file(s).)nargsmetavarhelpz-vz	--verboseZcount)r   defaultz-ez--conversion-errorZERRORNz<maxiumum approximation error measured in EM (default: 0.001))typer!   r#   r"   z-mz--mixedFZ
store_truez0whether to used mixed quadratic and cubic curves)r#   r   r"   z--keep-directionreverse_directionZstore_falsez$do not reverse the contour direction)Zdestr   r"   z-iz--interpolatablez@whether curve conversion should keep interpolation compatibility)r   r"   z-jz--jobsZ?ZNz9Convert using N multiple processes (default: %(default)s))r$   r    r#   Zconstr!   r"   z-oz--output-fileZOUTPUTzsoutput filename for the converted UFO. By default fonts are modified in place. This only works with a single input.)r#   r!   r"   z-dz--output-dirZ	DIRECTORYz-output directory where to save converted UFOsz9Either ufoLib2 or defcon are required to run this script.ZWARNINGZINFOZDEBUG)levelz2-o/--output-file can't be used with multile inputsz'%s' is not a directoryT)Z
dump_statsZ
max_err_emr%   Zall_quadraticzConverting curves compatiblyr   zRunning %d parallel processes).argparseZArgumentParserZadd_argument	fontToolsZ__version__ZfloatZadd_mutually_exclusive_groupZintr   Z
parse_argsr
   ZerrorZverboseloggingZbasicConfigZlenr   Zoutput_file
output_dirr   r   r   ZmkdirZisdirZjoinZbasenameZdictZconversion_errorr%   ZmixedZinterpolatabler   r   r   r   Zzipr   r   jobsZminr   r   r    r   ZPoolZstarmap)ZargsZparserZmode_parserZoutput_parserZoptionsr&   r*   ZpZoutput_pathsr   ZinfileZufosr   r   r   r+   ZfuncZpools   &                 r   _mainr,   C   sw   $$'2F
Iy?T?TU
4	   k'1E
K   ?    3	   557KO	   lH  	 779MF  	 <   %GPQ???	A	e$
7??aG$7$7$7IJ''
ww~~j))HHZ z**LL2Z?@CJ??
CRaBGGLLRWW%5%5a%89? 	 
 
			++, vGOO 44??Q&++!33&}}}e$	F 23/6?V ?d-f--$'$; K5HH[)HHJ %< ,/w+M'
;j6 ,N ;B,,:Js3w'6PQ!8-88DKK7>''4T3w#EF (' ,/w+M'
":EfE ,NM
$ @" (''s   >AT =T%'T**T;	r   )r   r'   r)   r   Zmultiprocessingr   Z
contextlibr    Z	functoolsr   r(   r   r   r   r
   ZufoLib2ZImportErrorZdefconZeZ	getLoggerr   r   r   r   r   r   r,   r   r   r   <module>r-      s    	        6
  
		,	-!
+-CFi  # s)   A B&A,,A>3B9A>>B