Your IP : 3.17.181.181


Current Path : /usr/lib64/python3.8/tkinter/__pycache__/
Upload File :
Current File : //usr/lib64/python3.8/tkinter/__pycache__/font.cpython-38.opt-2.pyc

U

e5d@�@szdZddlZddlZdZdZdZdZdd�ZGd	d
�d
�Zd dd�Z	d!d
d�Z
edk�rve��Z
edded�Zee���ee�d��ee�d��ee���ee�d��ee�d��ee
��ee�d�e�d��eeje
d��edd�Zee�d�ejde
d��eje
ded�Ze��eje
de
jd�Ze��eedd���Zejed�ejed�e��dS)"z0.9�NZnormalZroman�boldZitaliccCst|dd�S)NT)�name�exists)�Font�r�r�$/usr/lib64/python3.8/tkinter/font.py�
nametofontsr	c@s�eZdZe�d�Zdd�Zdd�Zdd�Zd"d
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zd#dd�Zdd�Zdd�ZeZd$dd�Zd d!�ZdS)%r�cCs:g}|��D]$\}}|�d|�|�t|��qt|�S�N�-)�items�append�str�tuple)�self�kw�options�k�vrrr�_set1s
z	Font._setcCs$g}|D]}|�d|�qt|�Sr)rr)r�argsrrrrr�_get8sz	Font._getcCs:i}tdt|�d�D] }||d|||dd�<q|S)Nr�r
)�range�len)rrr�irrr�_mkdict>szFont._mkdictNFcKs�|st�d�}t|d|�}|r4|�|�dd|��}n
|�|�}|sTdtt|j��}||_	|r�d|_
|j	|�|�dd��kr�tj�d|j	f��|r�|jdd|j	f|��n|jdd	|j	f|��d
|_
||_
|j|_|j|_dS)Nzuse font�tk�font�actualF�namesz$named font %s does not already exist�	configureZcreateT)�tkinter�_get_default_root�getattr�	splitlist�callrr�next�counterr�delete_fontZ_tkinterZTclError�_tk�_split�_call)r�rootrrrrrrrr�__init__Ds,


�z
Font.__init__cCs|jS�Nr�rrrr�__str__cszFont.__str__cCs&t|t�stS|j|jko$|j|jkSr0)�
isinstancer�NotImplementedrr+)r�otherrrr�__eq__fs
zFont.__eq__cCs
|�|�Sr0)�cget)r�keyrrr�__getitem__kszFont.__getitem__cCs|jf||i�dSr0)r")rr8�valuerrr�__setitem__nszFont.__setitem__cCs4z|jr|�dd|j�Wntk
r.YnXdS)Nr�delete)r*r-r�	Exceptionr1rrr�__del__qs
zFont.__del__cCst|jf|���Sr0)rr+r r1rrr�copyxsz	Font.copycCs^d}|rd|f}|r8|d|f}|jdd|jf|��S|�|�|jdd|jf|����SdS)Nr�
-displayofrrr )r-rrr,)r�option�	displayofrrrrr |s�zFont.actualcCs|�dd|jd|�S)Nr�configr)r-r)rrArrrr7�sz	Font.cgetc	KsB|r"|jdd|jf|�|���n|�|�|�dd|j���SdS)NrrC)r-rrrr,)rrrrrrC�s��zFont.configcCs2|f}|rd||f}|j�|jdd|jf|���S)Nr@r�measure)r+�getintr-r)r�textrBrrrrrD�s
zFont.measurecOs�d}|�dd�}|rd|f}|rL||�|�}|j�|jdd|jf|���S|�|jdd|jf|���}i}tdt|�d�D](}|j�||d�|||dd�<q||SdS)	NrrBr@r�metricsrrr
)	�poprr+rEr-rr,rr)rrrrrB�resrrrrrG�s�&zFont.metrics)NNNF)NN)N)�__name__�
__module__�__qualname__�	itertools�countr)rrrr/r2r6r9r;r>r?r r7rCr"rDrGrrrrrs"


	
rcCs6|st�d�}d}|rd|f}|j�|jjd|���S)Nzuse font.families()rr@r�families)rrO�r#r$rr&r')r.rBrrrrrO�s
rOcCs$|st�d�}|j�|j�dd��S)Nzuse font.names()rr!rP)r.rrrr!�s
r!�__main__�times�)�family�size�weightrTrVZhelloZ	linespace)rB)ZCourier�r)rzHello, world)rFrzQuit!)rFZcommandr)rV)NN)N)�__version__rMr#ZNORMALZROMANZBOLDZITALICr	rrOr!rJZTkr.�f�printr rCr7rDrGZLabel�wZpackZButtonZdestroyr?ZfbZmainlooprrrr�<module>sB








?>