
    lh                     R    d Z ddlmZ ddlmZ ddlmZmZ dZ G d de	          Z
dS )	a  :mod:`wand.font` --- Fonts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 0.3.0

:class:`Font` is an object which takes the :attr:`~Font.path` of font file,
:attr:`~Font.size`, :attr:`~Font.color`, and whether to use
:attr:`~Font.antialias`\ ing.  If you want to use font by its name rather
than the file path, use TTFQuery_ package.  The font path resolution by its
name is a very complicated problem to achieve.

.. seealso::

   TTFQuery_ --- Find and Extract Information from TTF Files
      TTFQuery builds on the `FontTools-TTX`_ package to allow the Python
      programmer to accomplish a number of tasks:

      - query the system to find installed fonts

      - retrieve metadata about any TTF font file

        - this includes the glyph outlines (shape) of individual code-points,
          which allows for rendering the glyphs in 3D (such as is done in
          OpenGLContext)

      - lookup/find fonts by:

        - abstract family type
        - proper font name

      - build simple metadata registries for run-time font matching

.. _TTFQuery: http://ttfquery.sourceforge.net/
.. _FontTools-TTX: http://sourceforge.net/projects/fonttools/

   )
assertions)Color)string_typetext)Fontc                       e Zd ZdZ	 	 ddZed             Zed             Zed             Zed	             Z	ed
             Z
ed             Zd ZdS )r   a  Font struct which is a subtype of :class:`tuple`.

    :param path: the path of the font file
    :type path: :class:`str`, :class:`basestring`
    :param size: the size of typeface.  0 by default which means *autosized*
    :type size: :class:`numbers.Real`
    :param color: the color of typeface.  black by default
    :type color: :class:`~wand.color.Color`
    :param antialias: whether to use antialiasing.  :const:`True` by default
    :type antialias: :class:`bool`
    :param stroke_color: optional color to outline typeface.
    :type stroke_color: :class:`~wand.color.Color`
    :param stroke_width: optional thickness of typeface outline.
    :type stroke_width: :class:`numbers.Real`

    .. versionchanged:: 0.3.9
       The ``size`` parameter becomes optional.  Its default value is
       0, which means *autosized*.

    .. versionchanged:: 0.5.0
       Added ``stroke_color`` & ``stoke_width`` parameters.
        NTc           	      
   t          j        |           t          j        |           |t          d          }n$t	          |t
                    rt          |          }t          j        |           |r9t	          |t
                    rt          |          }t          j        |           |t          j        |           t          |          }t          	                    | |||t          |          ||f          S )N)path)sizeblack)color)stroke_color)stroke_width)r   assert_stringassert_realr   
isinstancer   assert_colorr   tuple__new__bool)clsr   r   r   	antialiasr   r   s          L/var/www/html/research.buxo.ca/env/lib/python3.11/site-packages/wand/font.pyr   zFont.__new__D   s     d++++D))))='NNEE{++ 	!%LLEe,,,, 	?,44 3$\22#>>>>#"====Dzz}}S4ud9oo#/#? @ @ 	@    c                     | d         S )z,(:class:`basestring`) The path of font file.r	    selfs    r   r   z	Font.pathW        Awr   c                     | d         S )z0(:class:`numbers.Real`) The font size in pixels.r   r   r   s    r   r   z	Font.size\   r    r   c                     | d         S )z+(:class:`wand.color.Color`) The font color.   r   r   s    r   r   z
Font.colora   r    r   c                     | d         S )z^(:class:`bool`) Whether to apply antialiasing (``True``)
        or not (``False``).

           r   r   s    r   r   zFont.antialiasf   s     Awr   c                     | d         S )z-(:class:`wand.color.Color`) The stroke color.   r   r   s    r   r   zFont.stroke_colorn   r    r   c                     | d         S )z5(:class:`numbers.Real`) The width of the stroke line.   r   r   s    r   r   zFont.stroke_widths   r    r   c                 x    d                     t          |           t                              |                     S )Nz {0.__module__}.{0.__name__}({1}))formattyper   __repr__r   s    r   r-   zFont.__repr__x   s2    188JJNN4  
 
 	
r   )r	   NTNN)__name__
__module____qualname____doc__r   propertyr   r   r   r   r   r   r-   r   r   r   r   r   ,   s         . :>04@ @ @ @&   X   X   X   X   X   X
 
 
 
 
r   r   N)r1    r   r   r   compatr   r   __all__r   r   r   r   r   <module>r6      s   # #H             % % % % % % % %
P
 P
 P
 P
 P
5 P
 P
 P
 P
 P
r   