Ë
    £eh|!  ã                   ó  — d dl mZ d dlmZ efd„Z G d„ de«      Zd
d„Zedk(  r`d dl	Z	 e
e	j                  «      d	k(  r/d dlZ e	j                   ej                  «       j                  «        e	j                   e«       «       yy)é    )ÚCallable)ÚBasePenc                 ó8   ‡— dj                  ˆfd„| D «       «      S )Nú c              3   ó.   •K  — | ]  } ‰|«      –— Œ y ­w©N© )Ú.0ÚiÚntoss     €úW/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/fontTools/pens/svgPathPen.pyú	<genexpr>z pointToString.<locals>.<genexpr>   s   øè ø€ Ò( ‘D˜—GÑ(ùs   ƒ)Újoin)Úptr   s    `r   ÚpointToStringr      s   ø€ Ø�8‰8Ó( RÔ(Ó(Ð(ó    c                   ó\   — e Zd ZdZefdeegef   fd„Zd„ Zd„ Z	d„ Z
d„ Zd„ Zd	„ Zd
„ Zd„ Zy)Ú
SVGPathPena½  Pen to draw SVG path d commands.

    Args:
        glyphSet: a dictionary of drawable glyph objects keyed by name
            used to resolve component references in composite glyphs.
        ntos: a callable that takes a number and returns a string, to
            customize how numbers are formatted (default: str).

    :Example:
        .. code-block::

            >>> pen = SVGPathPen(None)
            >>> pen.moveTo((0, 0))
            >>> pen.lineTo((1, 1))
            >>> pen.curveTo((2, 2), (3, 3), (4, 4))
            >>> pen.closePath()
            >>> pen.getCommands()
            'M0 0 1 1C2 2 3 3 4 4Z'

    Note:
        Fonts have a coordinate system where Y grows up, whereas in SVG,
        Y grows down.  As such, rendering path data from this pen in
        SVG typically results in upside-down glyphs.  You can fix this
        by wrapping the data from this pen in an SVG group element with
        transform, or wrap this pen in a transform pen.  For example:
        .. code-block:: python

            spen = svgPathPen.SVGPathPen(glyphset)
            pen= TransformPen(spen , (1, 0, 0, -1, 0, 0))
            glyphset[glyphname].draw(pen)
            print(tpen.getCommands())
    r   c                 óv   — t        j                  | |«       g | _        d | _        d | _        d | _        || _        y r   )r   Ú__init__Ú	_commandsÚ_lastCommandÚ_lastXÚ_lastYÚ_ntos)ÚselfÚglyphSetr   s      r   r   zSVGPathPen.__init__+   s6   € Ü×Ñ˜˜xÔ(ØˆŒØ ˆÔØˆŒØˆŒØˆ�
r   c                 óZ   — | j                   dk(  r| j                  j                  d«       yy)z™
        >>> pen = SVGPathPen(None)
        >>> pen.moveTo((0, 0))
        >>> pen.moveTo((10, 10))
        >>> pen._commands
        ['M10 10']
        ÚMéÿÿÿÿN)r   r   Úpop©r   s    r   Ú_handleAnchorzSVGPathPen._handleAnchor3   s)   € ð ×Ñ Ò#Ø�N‰N×Ñ˜rÕ"ð $r   c                 ó¸   — | j                  «        dt        || j                  «      z  }| j                  j	                  |«       d| _        |\  | _        | _        y)aV  
        >>> pen = SVGPathPen(None)
        >>> pen.moveTo((0, 0))
        >>> pen._commands
        ['M0 0']

        >>> pen = SVGPathPen(None)
        >>> pen.moveTo((10, 0))
        >>> pen._commands
        ['M10 0']

        >>> pen = SVGPathPen(None)
        >>> pen.moveTo((0, 10))
        >>> pen._commands
        ['M0 10']
        zM%sr   N)r#   r   r   r   Úappendr   r   r   )r   r   Úts      r   Ú_moveTozSVGPathPen._moveTo>   sM   € ð" 	×ÑÔØ”] 2 t§z¡zÓ2Ñ3ˆØ�‰×Ñ˜aÔ ØˆÔØ#%Ñ ˆŒ�T•[r   c                 óÜ  — |\  }}|| j                   k(  r|| j                  k(  ry|| j                   k(  rd}| j                  |«      }nf|| j                  k(  rd}| j                  |«      }nC| j                  dk(  rd}dt	        || j                  «      z   }nd}t	        || j                  «      }d}|r||z  }|| _        ||z  }| j
                  j                  |«       |\  | _         | _        y)aU  
        # duplicate point
        >>> pen = SVGPathPen(None)
        >>> pen.moveTo((10, 10))
        >>> pen.lineTo((10, 10))
        >>> pen._commands
        ['M10 10']

        # vertical line
        >>> pen = SVGPathPen(None)
        >>> pen.moveTo((10, 10))
        >>> pen.lineTo((10, 0))
        >>> pen._commands
        ['M10 10', 'V0']

        # horizontal line
        >>> pen = SVGPathPen(None)
        >>> pen.moveTo((10, 10))
        >>> pen.lineTo((0, 10))
        >>> pen._commands
        ['M10 10', 'H0']

        # basic
        >>> pen = SVGPathPen(None)
        >>> pen.lineTo((70, 80))
        >>> pen._commands
        ['L70 80']

        # basic following a moveto
        >>> pen = SVGPathPen(None)
        >>> pen.moveTo((0, 0))
        >>> pen.lineTo((10, 10))
        >>> pen._commands
        ['M0 0', ' 10 10']
        NÚVÚHr   r   ÚLÚ )r   r   r   r   r   r   r%   )r   r   ÚxÚyÚcmdÚptsr&   s          r   Ú_lineTozSVGPathPen._lineToU   så   € ðH ‰ˆˆ1à�—‘Ò  T§[¡[Ò 0Øà�$—+‘+ÒØˆCØ—*‘*˜Q“-‰Cà�$—+‘+ÒØˆCØ—*‘*˜Q“-‰Cà×Ñ #Ò%ØˆCØœ b¨$¯*©*Ó5Ñ5‰Cð ˆCÜ  D§J¡JÓ/ˆCàˆÙØ�‰HˆAØ #ˆDÔØ	ˆS‰ˆØ�‰×Ñ˜aÔ à#%Ñ ˆŒ�T•[r   c                 ó  — d}|t        || j                  «      dz   z  }|t        || j                  «      dz   z  }|t        || j                  «      z  }| j                  j                  |«       d| _        |\  | _        | _        y)z›
        >>> pen = SVGPathPen(None)
        >>> pen.curveTo((10, 20), (30, 40), (50, 60))
        >>> pen._commands
        ['C10 20 30 40 50 60']
        ÚCr   N©r   r   r   r%   r   r   r   )r   Úpt1Úpt2Úpt3r&   s        r   Ú_curveToOnezSVGPathPen._curveToOne—   sz   € ð ˆØ	Œ]˜3 §
¡
Ó+¨cÑ1Ñ1ˆØ	Œ]˜3 §
¡
Ó+¨cÑ1Ñ1ˆØ	Œ]˜3 §
¡
Ó+Ñ+ˆØ�‰×Ñ˜aÔ ØˆÔØ#&Ñ ˆŒ�T•[r   c                 óÜ   — |€J ‚d}|t        || j                  «      dz   z  }|t        || j                  «      z  }| j                  j                  |«       d| _        |\  | _        | _        y)aw  
        >>> pen = SVGPathPen(None)
        >>> pen.qCurveTo((10, 20), (30, 40))
        >>> pen._commands
        ['Q10 20 30 40']
        >>> from fontTools.misc.roundTools import otRound
        >>> pen = SVGPathPen(None, ntos=lambda v: str(otRound(v)))
        >>> pen.qCurveTo((3, 3), (7, 5), (11, 4))
        >>> pen._commands
        ['Q3 3 5 4', 'Q7 5 11 4']
        NÚQr   r4   )r   r5   r6   r&   s       r   Ú_qCurveToOnezSVGPathPen._qCurveToOne¦   sj   € ð ˆÐˆØˆØ	Œ]˜3 §
¡
Ó+¨cÑ1Ñ1ˆØ	Œ]˜3 §
¡
Ó+Ñ+ˆØ�‰×Ñ˜aÔ ØˆÔØ#&Ñ ˆŒ�T•[r   c                 ód   — | j                   j                  d«       d| _        dx| _        | _        y)zp
        >>> pen = SVGPathPen(None)
        >>> pen.closePath()
        >>> pen._commands
        ['Z']
        ÚZN)r   r%   r   r   r   r"   s    r   Ú
_closePathzSVGPathPen._closePathº   s,   € ð 	�‰×Ñ˜cÔ"ØˆÔØ$(Ð(ˆŒ�d•kr   c                 ó.   — d| _         dx| _        | _        y)zk
        >>> pen = SVGPathPen(None)
        >>> pen.endPath()
        >>> pen._commands
        []
        N)r   r   r   r"   s    r   Ú_endPathzSVGPathPen._endPathÅ   s   € ð !ˆÔØ$(Ð(ˆŒ�d•kr   c                 ó8   — dj                  | j                  «      S )Nr,   )r   r   r"   s    r   ÚgetCommandszSVGPathPen.getCommandsÏ   s   € Ø�w‰w�t—~‘~Ó&Ð&r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústrr   Úfloatr   r#   r'   r1   r8   r;   r>   r@   rB   r	   r   r   r   r   	   sP   „ ñðB ADñ  x°°¸°Ñ'=ó ò	#ò&ò.@&òD'ò'ò(	)ò)ó'r   r   Nc                 óÂ  ‡— | €ddl }|j                  dd } ddlm} ddl}|j                  dd¬«      }|j                  dd	d
¬«       |j                  dddd¬«       |j                  ddd¬«       |j                  ddt        d¬«       |j                  dddd¬«       |j                  | «      }|j                  �t        |j                  «      nd} ||j                  |¬«      }|j                  }|j                  }	i }
|j                  j                  «       D ]9  }|j                  d«      }|d   j!                  «       }t#        |d   «      }||
|<   Œ; |d   }|j$                  |j&                  }}|j)                  |
¬«      }|d    j+                  «       Š|	�|�t-        d!«      ‚|	€d"j/                  ˆfd#„|D «       «      }	|	j                  «       }	d}d}|	D ]M  }||   }t1        |«      }|j3                  |«       |j5                  «       }|d$|||fz  z  }||j6                  z  }ŒO t9        d%«       t9        d&|||z
  fz  «       t9        |d¬'«       t9        d(«       y))z-Generate per-character SVG from font and textNr   é   )ÚTTFontzfonttools pens.svgPathPenzGenerate SVG from text)ÚdescriptionÚfontzfont.ttfz
Font file.)ÚmetavarÚhelpÚtextú?zText string.)rN   ÚnargsrO   z-yz<number>z1Face index into a collection to open. Zero based.z--glyphsz(whitespace-separated list of glyph namesz*Glyphs to show. Exclusive with text option)rN   ÚtyperO   z--variationszAXIS=LOCr,   z¼List of space separated locations. A location consist in the name of a variation axis, followed by '=' and a number. E.g.: wght=700 wdth=80. The default is the location of the base master.)rN   ÚdefaultrO   )Ú
fontNumberú=Úhhea)ÚlocationÚcmapz)Options --glyphs and --text are exclusiver   c              3   ó:   •K  — | ]  }‰t        |«         –— Œ y ­wr   )Úord)r
   ÚurY   s     €r   r   zmain.<locals>.<genexpr>  s   øè ø€ Ò5¨1˜$œs 1›v�,Ñ5ùs   ƒz?<g transform="translate(%d %d) scale(1 -1)"><path d="%s"/></g>
z&<?xml version="1.0" encoding="UTF-8"?>z?<svg width="%d" height="%d" xmlns="http://www.w3.org/2000/svg">)Úendz</svg>)ÚsysÚargvÚfontTools.ttLibrK   ÚargparseÚArgumentParserÚadd_argumentrG   Ú
parse_argsr.   ÚintrM   rP   ÚglyphsÚ
variationsÚsplitÚstriprH   ÚascentÚdescentÚgetGlyphSetÚgetBestCmapÚ
ValueErrorr   r   ÚdrawrB   ÚwidthÚprint)Úargsr^   rK   ra   ÚparserÚoptionsrU   rM   rP   rf   rX   Útag_vÚfieldsÚtagÚvrW   rj   rk   ÚglyphsetÚsrp   ÚgÚglyphÚpenÚcommandsrY   s                            @r   Úmainr   Ó   s›  ø€ ð €|Ûà�x‰x˜˜ˆ|ˆå&Ûà×$Ñ$Ø#Ð1Ið %ó €Fð ×Ñ˜¨
¸ÐÔFØ
×Ñ˜¨°cÀÐÔOØ
×ÑØØØ@ð ô ð
 ×ÑØØ:ÜØ9ð	 ô ð ×ÑØØØðLð	 ô ð ×Ñ Ó%€Gà#*§9¡9Ð#8”�W—Y‘Y”¸a€Já�'—,‘,¨:Ô6€DØ�<‰<€DØ�^‰^€Fà€HØ×#Ñ#×)Ñ)Ó+ò ˆØ—‘˜SÓ!ˆØ�Q‰i�o‰oÓˆÜ�&˜‘)ÓˆØˆ�Šð	ð �‰<€DØ—k‘k 4§<¡<ˆG€Fà×Ñ¨ÐÓ2€HØ�‰<×#Ñ#Ó%€DàÐ˜dÐ.ÜÐDÓEÐEà€~Ø—‘Ó5°Ô5Ó5ˆà�\‰\‹^€Fà
€AØ€EØò ˆØ˜‘ˆä˜Ó"ˆØ�
‰
�3ŒØ—?‘?Ó$ˆà	ÐOØØØðS
ñ 
ñ 	
ˆð 	�—‘Ñ‰ðô 
Ð
2Ô3Ü	ØIØ�&˜7Ñ"Ð
#ñ	$ôô 
ˆ!�ÕÜ	ˆ(…Or   Ú__main__rJ   r   )Útypingr   ÚfontTools.pens.basePenr   rG   r   r   r   rC   r^   Úlenr_   ÚdoctestÚexitÚtestmodÚfailedr	   r   r   ú<module>rˆ      s}   ðÝ Ý *ð ó )ôG'�ô G'óTXðv ˆzÒÛá
ˆ3�8‰8ƒ}˜ÒÛàˆ�‰��—‘Ó"×)Ñ)Ô*à€C‡H�H‰T‹VÕð r   