403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.52
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/matplotlib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/matplotlib/__pycache__/_fontconfig_pattern.cpython-312.pyc
�

G8�c����dZddlmZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
dZejdez�j Zejdez�j ZdZejdez�j Zejdez�j ZGd	�d
�Ze�e�j.�Zd�Zd�Zy)
z�
A module for parsing and generating `fontconfig patterns`_.

.. _fontconfig patterns:
   https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
�)�	lru_cacheN)�Literal�
ZeroOrMore�Optional�Regex�	StringEnd�ParseException�Suppressz\\\-:,z\\([%s])z([%s])z\\=_:,c	���eZdZdZidd�dd�dd�dd�dd�d	d
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd �d!d"d#d$d%d&d'd(��Zd)�Zd*�Zd+�Zd,�Zd-�Z	d.�Z
d/�Zd0�Zd1�Z
y2)3�FontconfigPatternParserz�
    A simple pyparsing-based parser for `fontconfig patterns`_.

    .. _fontconfig patterns:
       https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
    �thin)�weight�light�
extralight�
ultralightr�book)rr�regular)rr�normal)rr�medium)rr�demibold)rr�semibold)rr�bold)rr�	extrabold)rz
extra bold�black)rr�heavy)rr�roman)�slantr�italic)rr�oblique)rr)�widthzultra-condensed)r zextra-condensed)r �	condensed)r zsemi-condensed)r �expanded)r zextra-expanded)r zultra-expanded)�ultracondensed�extracondensedr!�
semicondensedr"�
extraexpanded�
ultraexpandedc��tdt�dt�d��j|j�}td�j|j�}td�j|j
�}tdt�dt�d��j|j�}|ttd�|z�zj|j�}|ttd�|z�zj|j�}|ttd��z|ztttd��|z�z|zj|j�}t|�ttd�|z�zttd	�|z�zt�z}||_t"|_y)
Nz([^z]|(\\[z]))*z([0-9]+\.?[0-9]*|\.[0-9]+)z[a-z]+�,�=�-�:)r�family_punc�setParseAction�_family�_size�_name�
value_punc�_valuerr�	_families�_point_sizesr
�	_propertyrr�_parserr	)	�self�family�size�name�value�families�point_sizes�property�patterns	         �@/usr/lib/python3/dist-packages/matplotlib/_fontconfig_pattern.py�__init__z FontconfigPatternParser.__init__>s����$/��=�
�
�.����
&�	��)�
�
�.����
$�	
���
�
�.����
$�	
��$.�
�;�
�
�.����
%�	�

��������
��.����
(�	�
��������
��.��*�*�
+�	������%�&�����'�#�,�'������

��.����
(�	�
��
��������
�
�������
��k�
�	����,���c���ix}|_	|jj|�d|_|jj�|S#|j$r}t	d|�d|���|�d}~wwxYw)z�
        Parse the given fontconfig *pattern* and return a dictionary
        of key/value pairs useful for initializing a
        `.font_manager.FontProperties` object.
        zCould not parse font string: 'z'
N)�_propertiesr7�parseStringr	�
ValueError�
resetCache)r8r@�props�es    rA�parsezFontconfigPatternParser.parsews|��$&�%��� �	O��L�L�$�$�W�-�
 ��������!�����"�"�	O��;B�A�F�H�MN�
O��	O�s�A	�	A/�A*�*A/c�4�tdt|d��gS�Nz\1r)�family_unescape�str�r8�s�loc�tokenss    rAr/zFontconfigPatternParser._family�s����s�6�!�9�~�6�7�7rCc� �t|d�gS�Nr)�floatrPs    rAr0zFontconfigPatternParser._size�s���f�Q�i� �!�!rCc� �t|d�gSrU�rOrPs    rAr1zFontconfigPatternParser._name�s���F�1�I���rCc�4�tdt|d��gSrM)�value_unescaperOrPs    rAr3zFontconfigPatternParser._value�s���u�c�&��)�n�5�6�6rCc�\�|D�cgc]
}t|���c}|jd<gScc}w)Nr9�rOrE�r8rQrRrS�xs     rAr4z!FontconfigPatternParser._families�s+��6<�%=��c�!�f�%=�����"��	��&>��)c�\�|D�cgc]
}t|���c}|jd<gScc}w)Nr:r\r]s     rAr5z$FontconfigPatternParser._point_sizes�s+��4:�#;�q�C��F�#;����� ��	��$<r_c�2�t|�dk(rS|d|jvr@|j|d\}}|jj|g�j	|�gS|d}|dd}|jj|g�j|�gS)N�r)�len�
_constantsrE�
setdefault�append�extend)r8rQrRrS�key�vals      rAr6z!FontconfigPatternParser._property�s����v�;�!���a�y�D�O�O�+��?�?�6�!�9�5���S�� � �+�+�C��4�;�;�C�@�
�	���)�C����*�C����'�'��R�0�7�7��<��	rCN)�__name__�
__module__�__qualname__�__doc__rdrBrKr/r0r1r3r4r5r6�rCrArrs1���
��-�
��-�
�	�-�
�	�-�	
�
	�,�
�	�/�

�	�.�
�	�.�
�	�0�
�	�0�
�	�,�
�	�2�
�	�-�
�	�-�
�	�-�
� 	�-�!
�"	�.�#
�$7�6�0�5�/�5�5�1
�J�67-�r�&8�"� �7���	rCrc���tj|�rt|t�r|g}dj	�fd�|D��S)z�
    Given a string value or a list of string values, run each value through
    the input escape function to make the values into legal font config
    strings.  The result is returned as a string.
    r)c3�F�K�|]}|��dt|�����y�w)Nz\\\1rX)�.0r^�escape_funcs  �rA�	<genexpr>z_escape_val.<locals>.<genexpr>�s(�����&�Q��}� ���Q��0�&�s�!)�np�iterable�
isinstancerO�join)rirrs `rA�_escape_valrx�s>����;�;�s��z�#�s�3��e���8�8�&�#�&�&�&rCc
�&�g}|j�}|�$|gk7r|jt|t��dD]D}t	|d|z��}|��|gk7s� |jd|�dt|t
�����Fdj
|�S)z[
    Given a dictionary of key/value pairs, generates a fontconfig
    pattern string.
    )�style�variantr�stretch�filer:�get_r,r*�)�
get_familyrfrx�
family_escape�getattr�value_escaperw)�drIr9rhris     rA�generate_fontconfig_patternr��s���

�E��\�\�^�F�
��f��l�
���[���7�8�I�K��&�g�a��#��&�(���?�s�b�y��L�L�S�+�c�<�*H�I�J�	K��7�7�5�>�rC)rm�	functoolsr�re�numpyrt�	pyparsingrrrrrr	r
r-�compile�subrNr�r2rZr�rrK�parse_fontconfig_patternrxr�rnrCrA�<module>r�s���� �	��1�1�1����"�*�*�[�;�6�7�;�;����
�
�9�{�2�3�7�7�
�
�
�����K�*�4�5�9�9���r�z�z�)�j�0�1�5�5��L�L�f'�9�;�'>�'@�'F�'F�G��
&�rC

Youez - 2016 - github.com/yon3zu
LinuXploit