HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/tkinter/__pycache__/font.cpython-37.opt-1.pyc
B

��g��@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)zFGiven the name of a tk named font, returns a Font representation.
    T)�name�exists)�Font)r�r�(/usr/local/lib/python3.7/tkinter/font.py�
nametofontsrc@s�eZdZdZe�d�Zdd�Zdd�Zdd�Z	d#dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zd$dd�Zdd�Zdd�ZeZd%dd �Zd!d"�Zd	S)&ra�Represents a named font.

    Constructor options are:

    font -- font specifier (name, system font, or (family, size, style)-tuple)
    name -- name to use for this font configuration (defaults to a unique name)
    exists -- does a named font by this name already exist?
       Creates a new named font if False, points to the existing font if True.
       Raises _tkinter.TclError if the assertion is false.

       the following are ignored if font is specified:

    family -- font 'family', e.g. Courier, Times, Helvetica
    size -- font size in points
    weight -- font thickness: NORMAL, BOLD
    slant -- font slant: ROMAN, ITALIC
    underline -- font underlining: false (0), true (1)
    overstrike -- font strikeout: false (0), true (1)

    �cCs>g}x0|��D]$\}}|�d|�|�t|��qWt|�S)N�-)�items�append�str�tuple)�self�kw�options�k�vrrr�_set1s
z	Font._setcCs(g}x|D]}|�d|�q
Wt|�S)Nr
)rr)r�argsrrrrr�_get8s
z	Font._getcCs>i}x4tdt|�d�D] }||d|||dd�<qW|S)Nr�r	)�range�len)rrr�irrr�_mkdict>s zFont._mkdictNFcKs�|s
tj}t|d|�}|r0|�|�dd|��}n
|�|�}|sPdtt|j��}||_	|r�d|_
|j	|�|�dd��kr�tj�d|j	f��|r�|jdd|j	f|��n|jdd|j	f|��d	|_
||_
|j|_|j|_dS)
N�tk�font�actualF�namesz$named font %s does not already exist�	configureZcreateT)�tkinter�
_default_root�getattr�	splitlist�callrr
�next�counterr�delete_fontZ_tkinterZTclError�_tk�_split�_call)r�rootrrrrrrrr�__init__Ds*
z
Font.__init__cCs|jS)N)r)rrrr�__str__cszFont.__str__cCst|t�o|j|jkS)N)�
isinstancerr)r�otherrrr�__eq__fszFont.__eq__cCs
|�|�S)N)�cget)r�keyrrr�__getitem__iszFont.__getitem__cCs|jf||i�dS)N)r )rr3�valuerrr�__setitem__lszFont.__setitem__cCs4y|jr|�dd|j�Wntk
r.YnXdS)Nr�delete)r(r+r�	Exception)rrrr�__del__os
zFont.__del__cCst|jf|���S)z*Return a distinct copy of the current font)rr)r)rrrr�copyvsz	Font.copycCs^d}|rd|f}|r8|d|f}|jdd|jf|��S|�|�|jdd|jf|����SdS)zReturn actual font attributesrz
-displayofr
rrN)r+rrr*)r�option�	displayofrrrrrzszFont.actualcCs|�dd|jd|�S)zGet font attributer�configr
)r+r)rr;rrrr2�sz	Font.cgetc	KsB|r"|jdd|jf|�|���n|�|�|�dd|j���SdS)zModify font attributesrr=N)r+rrrr*)rrrrrr=�s
zFont.configcCs2|f}|rd||f}|j�|jdd|jf|���S)zReturn text widthz
-displayofr�measure)r)�getintr+r)r�textr<rrrrr>�s
zFont.measurecOs�d}|�dd�}|rd|f}|rL||�|�}|j�|jdd|jf|���S|�|jdd|jf|���}i}x<tdt|�d�D](}|j�||d	�|||d	d�<q~W|SdS)
z}Return font metrics.

        For best performance, create a dummy widget
        using this font before calling this method.rr<Nz
-displayofr�metricsrrr	)	�poprr)r?r+rr*rr)rrrrr<ZresrrrrrA�s(zFont.metrics)NNNF)NN)N)�__name__�
__module__�__qualname__�__doc__�	itertools�countr'rrrr-r.r1r4r6r9r:rr2r=r r>rArrrrrs$


	
rcCs2|s
tj}d}|rd|f}|j�|jjd|���S)zGet font families (as a tuple)rz
-displayofr�families)rrI)r!r"rr$r%)r,r<rrrrrI�srIcCs |s
tj}|j�|j�dd��S)z'Get names of defined fonts (as a tuple)rr)r!r"rr$r%)r,rrrr�sr�__main__�times�)�family�size�weightrMrOZhelloZ	linespace)r<)ZCourier�r)rzHello, world)r@rzQuit!)r@Zcommandr)rO)NN)N)�__version__rGr!ZNORMALZROMANZBOLDZITALICrrrIrrCZTkr,�f�printrr=r2r>rAZLabel�w�packZButtonZdestroyr:ZfbZmainlooprrrr�<module>sB