HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/PIL/__pycache__/FontFile.cpython-38.pyc
U

g�
^�
�@s6ddlZddlmZmZdZdd�ZGdd�d�ZdS)	�N�)�Image�_binaryi cCs.|D]$}|dkr|d7}|�t�|��qdS)Nri)�writerZo16be)�fp�values�v�r	�./usr/lib/python3/dist-packages/PIL/FontFile.py�puti16src@s0eZdZdZdd�Zdd�Zdd�Zdd	�ZdS)
�FontFileNcCsi|_dgd|_dS)N�)�info�glyph)�selfr	r	r
�__init__)szFontFile.__init__cCs
|j|S)N)r)rZixr	r	r
�__getitem__.szFontFile.__getitem__cCs�|jr
dSd}}}d}|D]h}|r|\}}}}	t||d|d�}||d|d}|tkr||d7}|d|d}t||�}q|}
||}|
dkr�|dkr�dS||_t�d|
|f�|_dgd|_d}}
td�D]�}||}|r�|\}}}}	|d|d}||
}}||}|tk�r@d|
|}}
||
}}|}|d||d||d||d|f}|j�|	�	|�|�|||f|j|<q�dS)	zCreate metrics and bitmapNrr����1r
)
�bitmap�max�WIDTH�ysizer�new�metrics�rangeZpasteZcrop)r�h�wZmaxwidth�linesr�dZdst�srcZimZxsizer�x�y�iZxxZx0Zy0�sr	r	r
�compile1sF


,zFontFile.compilec	Cs�|��|j�tj�|�ddd�ttj�|�ddd��|}|�d�|�d|j�	d��|�d	�t
d
�D]B}|j|}|s�t|dgd�qtt||d|d|d
�qtW5QRXdS)z	Save fontrz.pbmZPNGz.pil�wbsPILfont
z
;;;;;;%d;
�asciisDATA
r
�
rrN)
r'r�save�os�path�splitext�openrr�encoderrr)r�filenamer�id�mr	r	r
r+`s


z
FontFile.save)�__name__�
__module__�__qualname__rrrr'r+r	r	r	r
r%s
/r)r,rrrrrrr	r	r	r
�<module>s