%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core/17212/usr/lib/python3.5/tkinter/__pycache__/
Upload File :
Create Path :
Current File : //snap/core/17212/usr/lib/python3.5/tkinter/__pycache__/font.cpython-35.pyc



|�g��@sdZddlZddlZdZdZdZdZdd�ZGd	d
�d
�Zdddd�Z	dd
d�Z
edkrej�Z
eddddde�Zeej��eejd��eejd��eej��eejd��eejd��ee
��eejd�ejd��eejde
��edd�Zeejd�ejdde
��eje
ddde�Zej�eje
ddde
j�Zej�eded�j�Zejde�ejde�ej�dS) z0.9�NZnormalZroman�boldZitaliccCstd|dd�S)zFGiven the name of a tk named font, returns a Font representation.
    �name�existsT)�Font)r�r�"/usr/lib/python3.5/tkinter/font.py�
nametofontsrc@s�eZdZdZejd�Zdd�Zdd�Zdd�Z	d	d	d	d
dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zd	d	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)

    �cCsQg}x>|j�D]0\}}|jd|�|jt|��qWt|�S)N�-)�items�append�str�tuple)�self�kw�options�k�vrrr�_set1s
z	Font._setcCs2g}x|D]}|jd|�q
Wt|�S)Nr
)rr)r�argsrrrrr�_get8s
z	Font._getcCsMi}x@tdt|�d�D]&}||d|||dd�<qW|S)Nr�r	)�range�len)rrr�irrr�_mkdict>s$zFont._mkdictNFcKs7|stj}t|d|�}|rH|j|jdd|��}n|j|�}|svdtt|j��}||_	|r�d|_
|j	|j|jdd��kr�tjjd|j	f��|r|jdd|j	|�n"|jdd|j	|�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
|j|�S)N)�cget)r�keyrrr�__getitem__iszFont.__getitem__cCs|j||i�dS)N)r )rr3�valuerrr�__setitem__lszFont.__setitem__cCs<y#|jr"|jdd|j�Wntk
r7YnXdS)NrZdelete)r(r+r�	Exception)rrrr�__del__os
	
zFont.__del__cCst|j|j��S)z*Return a distinct copy of the current font)rr)r)rrrr�copyvsz	Font.copycCswf}|rd|f}|rH|d|f}|jdd|j|�S|j|j|jdd|j|���SdS)zReturn actual font attributesz
-displayofr
rrN)r+rrr*)r�option�	displayofrrrrrzszFont.actualcCs|jdd|jd|�S)zGet font attributer�configr
)r+r)rr:rrrr2�sz	Font.cgetcKsW|r+|jdd|j|j|��n(|j|j|jdd|j���SdS)zModify font attributesrr<N)r+rrrr*)rrrrrr<�s
zFont.configcCsC|f}|rd||f}|jj|jdd|j|��S)zReturn text widthz
-displayofr�measure)r)�getintr+r)r�textr;rrrrr=�s	zFont.measurecOs�f}|jdd�}|r*d|f}|rh||j|�}|jj|jdd|j|��S|j|jdd|j|��}i}xLtdt|�d�D]2}|jj||d�|||dd�<q�W|SdS)	z}Return font metrics.

        For best performance, create a dummy widget
        using this font before calling this method.r;Nz
-displayofr�metricsrrr	)	�poprr)r>r+rr*rr)rrrrr;Zresrrrrr@�s	$0zFont.metrics)�__name__�
__module__�__qualname__�__doc__�	itertools�countr'rrrr-r.r1r4r6r8r9rr2r<r r=r@rrrrrs$	rcCsI|stj}f}|r'd|f}|jj|jjdd|��S)zGet font families (as a tuple)z
-displayofr�families)r!r"rr$r%)r,r;rrrrrH�s	rHcCs.|stj}|jj|jjdd��S)z'Get names of defined fonts (as a tuple)rr)r!r"rr$r%)r,rrrr�s	r�__main__Zfamily�times�size�ZweightZhelloZ	linespacer;r�Courier�r?zHello, worldzQuit!Zcommand)rMrNr)�__version__rFr!ZNORMALZROMANZBOLDZITALICrrrHrrBZTkr,�f�printrr<r2r=r@ZLabel�wZpackZButtonZdestroyr9ZfbZmainlooprrrr�<module>s@�


%



Zerion Mini Shell 1.0