%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__/PcfFontFile.cpython-312.pyc

�

��e�����UddlmZddlZddlmZmZddlmZmZddl	m
Z
ddl	mZddl	m
Zdd	l	mZdd
l	mZdZdZdZd
ZdZdZdZdZdZdZd�d�d�d�gZded<dd�ZGd�dej�Z y)�)�annotationsN)�BinaryIO�Callable�)�FontFile�Image)�i8)�i16be)�i16le)�i32be)�i32leifcp����� �@��c��|dzdz	S)N�����bitss �1/usr/lib/python3/dist-packages/PIL/PcfFontFile.py�<lambda>r.s��4�!�8��/��c��|dzdz	dzS)N�r���rrs rrr/���4�"�9��"�b�(�rc��|dzdz	dzS)N�r���rrs rrr0r"rc��|dzdz	dzS)N�?ri����rrs rrr1r"rzlist[Callable[[int], int]]�
BYTES_PER_ROWc�,�|||jd|�S)N�)�index)�s�os  r�szr.5s���Q������"�#�#rc�b��eZdZdZdZd	d
�fd�
Z				dd�Zdd�Zd
d�Z				dd�Z	dd�Z
�xZS)�PcfFontFilez(Font file plugin for the X11 PCF format.�namec	���||_t|jd��}|tk7r
d}t	|��t
�|��t|jd��}i|_t|�D]v}t|jd��}t|jd��t|jd��t|jd��f|j|<�x||_	|j�|_|j�}|j|�}	|j�}
t|
�D]<\}}|��	||\}
}}}}}}}|df|||z
|
|z|fdd|
|f|	|f|j |<�>y)Nrznot a PCF filer)�charset_encoding�l32�read�	PCF_MAGIC�SyntaxError�super�__init__�toc�range�fp�_load_properties�info�
_load_metrics�
_load_bitmaps�_load_encoding�	enumerate�glyph)�selfr<r3�magic�msg�count�i�type�metrics�bitmaps�encoding�ch�ix�xsize�ysize�left�right�width�ascent�descent�
attributes�	__class__s                     �rr9zPcfFontFile.__init__>s~��� 0����B�G�G�A�J����I��"�C��c�"�"�
�����B�G�G�A�J�������u��	O�A��r�w�w�q�z�?�D� ������_�c�"�'�'�!�*�o�s�2�7�7�1�:��N�D�H�H�T�N�	O�����)�)�+��	��$�$�&���$�$�W�-���&�&�(��
 ��)�	�F�B���~��B�K�	����������A�J��7�U�?�E�D�L�'�B���5�%�(��B�K�	"��
�
�2��	rc���|j|\}}}|j}|j|�t|j	d��}|dzr
t
t}}ntt}}||||fS)Nr)r:r<�seekr4r5�b16�b32�l16)rD�tag�format�size�offsetr<�i16�i32s        r�
_getformatzPcfFontFile._getformatlse�� $�x�x��}����f�
�W�W��
������R�W�W�Q�Z����A�:��C��C��C��C��6�3��#�#rc
�&�i}|jt�\}}}}||jd��}t|�D�cgc]I}||jd��t	|jd��||jd��f��K}}|dzr&|jd|dzz
tj�|j||jd���}	|D]%\}
}}|rt|	|�n|}
|
|t|	|
�<�'|Scc}w)Nrrr)	rc�PCF_PROPERTIESr5r;r	rY�io�SEEK_CURr.)rD�
propertiesr<r^rarb�nprops�_�p�data�kr,�v�property_values              rr=zPcfFontFile._load_properties}s����
�#���~�>���F�C���R�W�W�Q�Z���JO�v��W�A�c�"�'�'�!�*�o�r�"�'�'�!�*�~�s�2�7�7�1�:��
?�W��W��A�:��G�G�A��!��$�b�k�k�2��w�w�s�2�7�7�1�:��'���	5�G�A�q�!�9:�"�T�1�+��N�&4�J�r�$��{�#�	5����
Xs�ADc��g}|jt�\}}}}|j}|dzdk(r�t||j	d���D]�}t|j	d��dz
}t|j	d��dz
}	t|j	d��dz
}
t|j	d��dz
}t|j	d��dz
}|	|z
}
||z}||
|||	|
||df���|St||j	d���D]�}||j	d��}||j	d��}	||j	d��}
||j	d��}||j	d��}||j	d��}|	|z
}
||z}||
|||	|
|||f���|S)Ni�rrrrrr)rc�PCF_METRICS�appendr;r5r	)rDrJr<r^rarbrrrHrQrRrSrTrUrOrPrVs                rr?zPcfFontFile._load_metrics�s���HJ��#���{�;���F�C�������V�O��%��3�r�w�w�q�z�?�+�
O���"�'�'�!�*�~��+���2�7�7�1�:���,���2�7�7�1�:���,���B�G�G�A�J��#�-���R�W�W�Q�Z�.�3�.��������(����u�d�E�5�&�'�1�M�N�
O�.���3�r�w�w�q�z�?�+�	
X���2�7�7�1�:����B�G�G�A�J����B�G�G�A�J����R�W�W�Q�Z����b�g�g�a�j�/�� ������_�
�������(����u�d�E�5�&�'�:�V�W�	
X��rc
��|jt�\}}}}||jd��}|t|�k7r
d}t	|��t|�D�cgc]}||jd����}	}td�D�cgc]}||jd����}
}|dz}|dz}|
|}
|	j
|
�|j|
�}t|}d}|rd}g}t|�D]L}||dd\}}|	||dz\}}|j
tjd||f|||d|||����N|Scc}wcc}w)	NrzWrong number of bitmapsrrz1;R�1r�raw)
rc�PCF_BITMAPSr5�len�OSErrorr;rrr(r�	frombytes)rDrJr<r^rarb�nbitmapsrFrj�offsets�bitmap_sizes�bitorder�padindex�
bitmapsizerl�pad�moderKrHrOrP�b�es                       rr@zPcfFontFile._load_bitmaps�s[�� $���{�;���F�C���r�w�w�q�z�?���s�7�|�#�+�C��#�,��,1�(�O�<�q�3�r�w�w�q�z�?�<��<�16�q��:�A��B�G�G�A�J��:��:��A�:���A�:��!�(�+�
����z�"��w�w�z�"���H�%������D����x��	�A�"�1�:�b�q�>�L�E�5��1�q�1�u�%�D�A�q��N�N�����e�U�^�T�!�A�Y��t�S�QV�Z�X�
�	����5=��:s�E�E
c��|jt�\}}}}||jd��||jd��}}||jd��||jd��}}||jd��||z
dz||z
dzz}	dgtd|	�z}
t	|	�D�cgc]}||jd����}}t	|t|
��D]>}
	|t
t|
g�j|j��}|dk7r||
|
<�@|
Scc}w#t$rY�SwxYw)Nrrri��)rc�PCF_BDF_ENCODINGSr5�minr;rw�ord�	bytearray�decoder3�UnicodeDecodeError)rDr<r^rarb�	first_col�last_col�	first_row�last_row�	nencodingrLrj�encoding_offsetsrH�encoding_offsets               rrAzPcfFontFile._load_encoding�s@��#���/@�A���F�C��!�"�'�'�!�*�o�s�2�7�7�1�:��8�	�!�"�'�'�!�*�o�s�2�7�7�1�:��8�	��B�G�G�A�J���	�)�A�-�(�Y�2F��2J�K�	�'+�V�c�#�y�.A�%A��5:�9�5E�F��C�����
�O�F��F��y�#�h�-�0�		�A�
�"2��	�1�#��-�-�d�.C�.C�D�E�#��#�f�,�"1�H�Q�K��
		����G��&�
��
�s�<D4�5;D9�9	E�E)z	iso8859-1)r<rr3�str)r]�int�returnzDtuple[BinaryIO, int, Callable[[bytes], int], Callable[[bytes], int]])r�zdict[bytes, bytes | int])r��3list[tuple[int, int, int, int, int, int, int, int]])rJr�r�zlist[Image.Image])r�zlist[int | None])�__name__�
__module__�__qualname__�__doc__r1r9rcr=r?r@rA�
__classcell__)rWs@rr0r09sL���2��D�,�\$��$�	M�$�"�0#�J(�J�(�	�(�Trr0)r,�bytesr-r�r�r�)!�
__future__rrf�typingrr�rr�_binaryr	r
rZrr\rr[r
r4r6re�PCF_ACCELERATORSrqrv�PCF_INK_METRICSr��PCF_SWIDTHS�PCF_GLYPH_NAMES�PCF_BDF_ACCELERATORSr(�__annotations__r.r0rrr�<module>r�s���$#�	�%���!�!�!�!�

�	�������������������#�(�(�(�	-�
�)��$�E�(�#�#�Er

Zerion Mini Shell 1.0