B /g^@szdZddlZddlZdZdZdZdZddZGd d d Zd d d Z d!d dZ e dkrve Z eddedZeeeedeedeeeedeedee eededeeje deddZeedejde deje dedZeeje de jdZeeeddZejedejededS)"z0.9NZnormalZromanboldZitaliccCs t|ddS)NT)nameexists)Font)rr$/usr/lib64/python3.7/tkinter/font.py nametofontsrc@seZdZedZddZddZddZd"d d Z d d Z ddZ ddZ ddZ ddZddZd#ddZddZddZeZd$ddZd d!ZdS)%rcCs>g}x0|D]$\}}|d||t|qWt|S)N-)itemsappendstrtuple)selfkwoptionskvrrr_set1s z Font._setcCs(g}x|D]}|d|q Wt|S)Nr )r r)rargsrrrrr_get8s z Font._getcCs>i}x4tdt|dD] }||d|||dd<qW|S)Nrr )rangelen)rrrirrr_mkdict>s z Font._mkdictNFcKs|s tj}t|d|}|r0||dd|}n ||}|sPdtt|j}||_ |rd|_ |j ||ddkrtj d|j f|r|jdd|j f|n|jdd|j f|d |_ ||_ |j|_|j|_dS) NtkfontactualFnamesz$named font %s does not already exist configureZcreateT)tkinter _default_rootgetattr splitlistcallrr nextcounterr delete_fontZ_tkinterZTclError_tk_split_call)rrootrrrrrrrr__init__Ds*  z Font.__init__cCs|jS)N)r)rrrr__str__csz Font.__str__cCst|to|j|jkS)N) isinstancerr)rotherrrr__eq__fsz Font.__eq__cCs ||S)N)cget)rkeyrrr __getitem__iszFont.__getitem__cCs|jf||idS)N)r )rr3valuerrr __setitem__lszFont.__setitem__cCs4y|jr|dd|jWntk r.YnXdS)Nrdelete)r(r+r Exception)rrrr__del__os z Font.__del__cCst|jf|S)N)rr)r)rrrrcopyvsz Font.copycCs^d}|rd|f}|r8|d|f}|jdd|jf|S|||jdd|jf|SdS)Nrz -displayofr rr)r+rrr*)roption displayofrrrrrzsz Font.actualcCs|dd|jd|S)Nrconfigr )r+r)rr;rrrr2sz Font.cgetc KsB|r"|jdd|jf||n|||dd|jSdS)Nrr=)r+rrrr*)rrrrrr=s z Font.configcCs2|f}|rd||f}|j|jdd|jf|S)Nz -displayofrmeasure)r)getintr+r)rtextr<rrrrr>s z Font.measurecOsd}|dd}|rd|f}|rL|||}|j|jdd|jf|S||jdd|jf|}i}xrArrrrrs"     rcCs2|s tj}d}|rd|f}|j|jjd|S)Nrz -displayofrfamilies)rrH)r!r"rr$r%)r,r<rrrrrHs rHcCs |s tj}|j|jddS)Nrr)r!r"rr$r%)r,rrrrsr__main__times)familysizeweightrLrNZhelloZ linespace)r<)ZCourierr)rz Hello, world)r@rzQuit!)r@Zcommandr)rN)NN)N) __version__rFr!ZNORMALZROMANZBOLDZITALICrrrHrrCZTkr,fprintrr=r2r>rAZLabelwZpackZButtonZdestroyr:ZfbZmainlooprrrrsB