| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/pygments/formatters/__pycache__/ |
Upload File : |
a
SҼa#U � @ sZ d Z ddlZddlZddlmZ ddlmZmZmZm Z ddl
Z
zddlmZm
Z
mZ dZW n eyr dZY n0 zddlZW n6 ey� zddlZW n ey� dZY n0 Y n0 g d�Zg d �d
dgdgd
dgd�ZdZdZdZG dd� de�ZG dd� de�ZG dd� d�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZdS )!z�
pygments.formatters.img
~~~~~~~~~~~~~~~~~~~~~~~
Formatter for Pixmap output.
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)� Formatter)�get_bool_opt�get_int_opt�get_list_opt�get_choice_opt)�Image� ImageDraw� ImageFontTF)�ImageFormatter�GifImageFormatter�JpgImageFormatter�BmpImageFormatter)� ZRomanZBookZNormalZRegularZMediumZObliqueZItalicZBoldzBold ObliquezBold Italic)�NORMAL�ITALIC�BOLD�
BOLDITALICzDejaVu Sans MonozCourier NewZMenloc @ s e Zd ZdZdS )�PilNotAvailablez,When Python imaging library is not availableN��__name__�
__module__�__qualname__�__doc__� r r �;/usr/lib/python3.9/site-packages/pygments/formatters/img.pyr 5 s r c @ s e Zd ZdZdS )�FontNotFoundz(When there are no usable fonts specifiedNr r r r r r 9 s r c @ sd e Zd ZdZddd�Zdd� Zdd� Zd d
� Zdd� Zddd�Z dd� Z
dd� Zdd� Zdd� Z
dS )�FontManagerz>
Manages a set of fonts: normal, italic, bold, etc...
� c C sn || _ || _i | _d | _tj�d�r8|s.t| _ | �� n2tj�d�rX|sNt | _ | �
� n|sbt| _ | �� d S )N�win�darwin)
� font_name� font_size�fonts�encoding�sys�platform�
startswith�DEFAULT_FONT_NAME_WIN�_create_win�DEFAULT_FONT_NAME_MAC�_create_mac�DEFAULT_FONT_NAME_NIX�_create_nix)�selfr r! r r r �__init__B s
zFontManager.__init__c C sz t jdd||f dgt jd d�}|�� \}}|jdkrv|�� }|D ].}|�d�rRqB|�� �� �d�}|rB| S qBd S d S )Nzfc-listz%s:style=%s�file)�stdout�stderrr s Fontconfig warning:�:) �
subprocess�Popen�PIPEZcommunicate�
returncode�
splitlinesr&