�`^c@s�dZddlZdZdZdZdZd�Zddd ��YZdd
�Z dd�Z
edkr�ej�Z
ed
dddde�Zej�GHejd
�GHejd�GHej�GHejd
�GHejd�GHe
�GHejd�Gejd�GHej�GHedd�Zejd�Gejd�GHeje
ddde�Zej�eje
ddde
j�Zej�eded�j�Zejde�ejde�ej�ndS(s0.9i�NtnormaltromantboldtitaliccCstd|dt�S(sFGiven the name of a tk named font, returns a Font representation.
tnametexists(tFonttTrue(R((s#/sys/lib/python2.7/lib-tk/tkFont.pyt
nametofontsRcBs�eZdZd�Zd�Zd�Zddded�Zd�Z d�Z
d�Zd�Zd �Z
d
�Zdd�Zd�Zd
�ZeZd�Zd�ZRS(s�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(Nt-(titemstappendtstrttuple(tselftkwtoptionstktv((s#/sys/lib/python2.7/lib-tk/tkFont.pyt_set/s
cCs2g}x|D]}|jd|�q
Wt|�S(NR (RR
(RtargsRR((s#/sys/lib/python2.7/lib-tk/tkFont.pyt_get6s
cCsGi}x:tdt|�d�D] }||d|||d<qW|S(Niii(trangetlen(RRRti((s#/sys/lib/python2.7/lib-tk/tkFont.pyt_mkdict<scKsC|stj}n|r?|jj|jjdd|��}n|j|�}|smdtt|��}n||_|r�|_
|j|jj|jjdd��kr�tjjd|jf�n|r|jjdd|j|�qn%|jjdd|j|�t
|_
||_|jj|_|jj|_dS(Ntfonttactualtnamess$named font %s does not already existt configuretcreate(tTkintert
_default_rootttkt splitlisttcallRRtidRtFalsetdelete_fontt_tkintertTclErrorRt_roott_splitt_call(RtrootRRRR((s#/sys/lib/python2.7/lib-tk/tkFont.pyt__init__Bs(' " cCs|jS(N(R(R((s#/sys/lib/python2.7/lib-tk/tkFont.pyt__str__`scCs|j|jkot|t�S(N(Rt
isinstanceR(Rtother((s#/sys/lib/python2.7/lib-tk/tkFont.pyt__eq__cscCs
|j|�S(N(tcget(Rtkey((s#/sys/lib/python2.7/lib-tk/tkFont.pyt__getitem__fscCs|ji||6�dS(N(R(RR3tvalue((s#/sys/lib/python2.7/lib-tk/tkFont.pyt__setitem__iscCsWy&|jr%|jdd|j�nWn*ttfk
rB�ntk
rRnXdS(NRtdelete(R&R+RtKeyboardInterruptt
SystemExitt Exception(R((s#/sys/lib/python2.7/lib-tk/tkFont.pyt__del__ls
cCst|j|j��S(s*Return a distinct copy of the current font(RR)R(R((s#/sys/lib/python2.7/lib-tk/tkFont.pytcopyuscCsO|r#|jdd|jd|�S|j|j|jdd|j���SdS(sReturn actual font attributesRRR N(R+RRR*(Rtoption((s#/sys/lib/python2.7/lib-tk/tkFont.pyRyscCs|jdd|jd|�S(sGet font attributeRtconfigR (R+R(RR=((s#/sys/lib/python2.7/lib-tk/tkFont.pyR2�scKsW|r+|jdd|j|j|��n(|j|j|jdd|j���SdS(sModify font attributesRR>N(R+RRRR*(RR((s#/sys/lib/python2.7/lib-tk/tkFont.pyR>�s
cCst|jdd|j|��S(sReturn text widthRtmeasure(tintR+R(Rttext((s#/sys/lib/python2.7/lib-tk/tkFont.pyR?�scGs�|r.t|jdd|j|j|���S|j|jdd|j��}i}x@tdt|�d�D]&}t||d�|||d<qnW|SdS(s}Return font metrics.
For best performance, create a dummy widget
using this font before calling this method.RtmetricsiiiN(R@R+RRR*RR(RRtresR((s#/sys/lib/python2.7/lib-tk/tkFont.pyRB�s%!$N(t__name__t
__module__t__doc__RRRtNoneR%R-R.R1R4R6R;R<RR2R>RR?RB(((s#/sys/lib/python2.7/lib-tk/tkFont.pyRs"
cCs1|stj}n|jj|jjdd��S(sGet font families (as a tuple)Rtfamilies(RR R!R"R#(R,((s#/sys/lib/python2.7/lib-tk/tkFont.pyRH�scCs1|stj}n|jj|jjdd��S(s'Get names of defined fonts (as a tuple)RR(RR R!R"R#(R,((s#/sys/lib/python2.7/lib-tk/tkFont.pyR�st__main__tfamilyttimestsizeitweightthellot linespaceRtCourieriRAsHello, worldsQuit!tcommand((RPiR(t__version__RtNORMALtROMANtBOLDtITALICRRRGRHRRDtTkR,tfRR>R2R?RBtLabeltwtpacktButtontdestroyR<tfbtmainloop(((s#/sys/lib/python2.7/lib-tk/tkFont.pyt<module> s> �
|