+
    i                     
   ^ 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)    N)closing)partial)font_to_quadraticfonts_to_quadraticzfontTools.cu2quc                  R     \         P                  ! 4       #   \         d     ^# i ; i)   )mp	cpu_countNotImplementedError     s/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/fontTools/cu2qu/cli.py
_cpu_countr      s%    ||~ s    &&c                     \        \        P                  R 4      '       d    \        P                  P                  V 4      # \        P                  ! V 4      # )open)hasattr
ufo_moduleFontr   )paths   &r   open_ufor       s7    z''##D))??4  r   c                    \        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                 n   \         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   normcaseabspathrealpath)path1path2s   &&r   	_samepathr*   3   sj    GGRWW__RWW-=-=e-DEFEGGRWW__RWW-=-=e-DEFE>r   c                     \        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   debugr$   r   existsshutilrmtreecopytree)r   r   s   &&r   r   r   :   sH    ))MN	ww~~k""k"
OOJ,r   c                |
   \         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 curvescu2qu)progz	--versionversion)actionr4   infiles+INPUTz%one or more input UFO source file(s).)nargsmetavarhelpz-vz	--verbosecount)r5   defaultz-ez--conversion-errorERRORNz<maxiumum approximation error measured in EM (default: 0.001))typer:   r=   r;   z-mz--mixedF
store_truez0whether to used mixed quadratic and cubic curves)r=   r5   r;   z--keep-directionreverse_directionstore_falsez$do not reverse the contour direction)destr5   r;   z-iz--interpolatablez@whether curve conversion should keep interpolation compatibility)r5   r;   z-jz--jobs?Nz9Convert using N multiple processes (default: %(default)s))r?   r9   r=   constr:   r;   z-oz--output-file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-dir	DIRECTORYz-output directory where to save converted UFOsz9Either ufoLib2 or defcon are required to run this script.WARNINGINFODEBUG)levelz2-o/--output-file can't be used with multile inputsz'%s' is not a directoryT)
dump_stats
max_err_emrA   all_quadraticzConverting curves compatiblyr   zRunning %d parallel processes).argparseArgumentParseradd_argument	fontTools__version__floatadd_mutually_exclusive_groupintr   
parse_argsr   errorverboseloggingbasicConfiglenr6   output_file
output_dirr$   r   r-   mkdirisdirjoinbasenamedictconversion_errorrA   mixedinterpolatabler   r   r   r   zipr   r   jobsminr   r!   r   r	   Poolstarmap)argsparsermode_parseroutput_parseroptionsrL   r_   poutput_pathsr   infileufosr    r   r   ri   funcpools   &                 r   _mainrx   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$   rP   r[   r.   multiprocessingr	   
contextlibr   	functoolsr   rS   r    r   r   r   ufoLib2ImportErrordefcone	getLoggerr   r   r   r!   r*   r   rx   r   r   r   <module>r      s    	        6
  
		,	-!
+-CFi  # s)   A B&A,,A>3B9A>>B