
    .hhX                        S SK r S SKrSr/ SQrSrSrSrSrSS jr " S	 S
5      r	SS jr
SS jr\S:X  Ga  \R                  " 5       r\	" SS\S9r\" \R#                  5       5        \" \R#                  S5      5        \" \R#                  S5      5        \" \R%                  5       5        \" \R'                  S5      5        \" \R'                  S5      5        \" \" 5       5        \" \R)                  S5      \R+                  S5      5        \" \R+                  \S95        \	" SS9r\" \R)                  S5      \R+                  S\S95        \R,                  " \S\S9r\R1                  5         \R2                  " \S\R4                  S9r\R1                  5         \	" \S   S9R7                  5       r\R%                  \S9  \R%                  \S9  \R:                  " 5         gg)     Nz0.9)NORMALROMANBOLDITALIC
nametofontFontfamiliesnamesnormalromanbolditalicc                     [        U SUS9$ )zFGiven the name of a tk named font, returns a Font representation.
    T)nameexistsroot)r   )r   r   s     5/opt/python-3.13.8/usr/lib/python3.13/tkinter/font.pyr   r      s     T$T22    c                       \ rS rSrSr\R                  " S5      rS rS r	S r
SS jrS	 rS
 rS rS rS rS rS rSS jrS rS r\rSS jrS rSrg)r      a  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)

   c                     / nUR                  5        H3  u  p4UR                  SU-   5        UR                  [        U5      5        M5     [        U5      $ N-)itemsappendstrtuple)selfkwoptionskvs        r   _set	Font._set2   sE    HHJDANN3q5!NN3q6"  W~r   c                 V    / nU H  nUR                  SU-   5        M     [        U5      $ r   )r   r   )r   argsr!   r"   s       r   _get	Font._get9   s+    ANN3q5! W~r   c                 b    0 n[        S[        U5      S5       H  nXS-      X!U   SS  '   M     U$ )Nr      r   )rangelen)r   r'   r!   is       r   _mkdictFont._mkdict?   s;    q#d)Q'A#'!9GGABK  (r   Nc                    Uc  [         R                  " S5      n[        USU5      nU(       a#  UR                  UR	                  SSU5      5      nOU R                  U5      nU(       d!  S[        [        U R                  5      5      -   nX0l	        U(       a  SU l
        U R                  UR                  UR	                  SS5      5      ;  a.  [         R                  R                  SU R                  < S35      eU(       a  UR                  " SS	U R                  /UQ76   O&UR                  " SS
U R                  /UQ76   SU l
        X`l        UR                  U l        UR                  U l        g )Nzuse fonttkfontactualFr
   znamed font z does not already exist	configurecreateT)tkinter_get_default_rootgetattr	splitlistcallr$   r   nextcounterr   delete_font_tkinterTclError_tk_split_call)r   r   r3   r   r   r!   r2   s          r   __init__Font.__init__E   s   <,,Z8DT4&<<$ ?@D99W%DCT\\ 233D	$DyyRWWVW-E FF&&//>BiiIK K TYY>> GGFHdii7$7#Dllgg
r   c                     U R                   $ N)r   r   s    r   __str__Font.__str__d   s    yyr   c                     SU R                   R                   SU R                   R                   SU R                  < S3$ )N<.z object >)	__class__
__module____qualname__r   rH   s    r   __repr__Font.__repr__g   s<    4>>,,-Qt~~/J/J.K$))a) 	)r   c                     [        U[        5      (       d  [        $ U R                  UR                  :H  =(       a    U R                  UR                  :H  $ rG   )
isinstancer   NotImplementedr   rA   )r   others     r   __eq__Font.__eq__k   s:    %&&!!yyEJJ&@488uyy+@@r   c                 $    U R                  U5      $ rG   )cget)r   keys     r   __getitem__Font.__getitem__p   s    yy~r   c                 *    U R                   " S0 X0D6  g )N )r5   )r   r\   values      r   __setitem__Font.__setitem__s   s    &#&r   c                      U R                   (       a  U R                  SSU R                  5        g g ! [         a     g f = f)Nr3   delete)r>   rC   r   	ExceptionrH   s    r   __del__Font.__del__v   s;    	

68TYY7   		s   .2 
??c                 J    [        U R                  40 U R                  5       D6$ )z*Return a distinct copy of the current font)r   rA   r4   rH   s    r   copy	Font.copy}   s    DHH...r   c           	          SnU(       a  SU4nU(       a(  USU-   4-   nU R                   " SSU R                  /UQ76 $ U R                  U R                  U R                   " SSU R                  /UQ76 5      5      $ )zReturn actual font attributesr`   
-displayofr   r3   r4   )rC   r   r/   rB   )r   option	displayofr'   s       r   r4   Font.actual   sy     ),D3<**D::fh		ADAA<<DJJvxJTJKM Mr   c                 D    U R                  SSU R                  SU-   5      $ )zGet font attributer3   configr   )rC   r   )r   rn   s     r   r[   	Font.cget   s    zz&(DIIs6zBBr   c           	          U(       a/  U R                   " SSU R                  /U R                  U5      Q76   gU R                  U R	                  U R                  SSU R                  5      5      5      $ )zModify font attributesr3   rr   N)rC   r   r$   r/   rB   )r   r!   s     r   rr   Font.config   s^    JJvx '99W%' <<DJJvxCDF Fr   c                     U4nU(       a  SX!4nU R                   R                  U R                  " SSU R                  /UQ76 5      $ )zReturn text widthrm   r3   measure)rA   getintrC   r   )r   textro   r'   s       r   rw   Font.measure   s?    w )2Dxxtzz&)TYYNNOOr   c                    SnUR                  SS5      nU(       a  SU4nU(       aK  X0R                  U5      -   nU R                  R                  U R                  " SSU R
                  /UQ76 5      $ U R                  U R                  " SSU R
                  /UQ76 5      n0 n[        S[        U5      S5       H+  nU R                  R                  XVS	-      5      XU   S	S '   M-     U$ )
zmReturn font metrics.

For best performance, create a dummy widget
using this font before calling this method.r`   ro   Nrm   r3   metricsr   r+   r   )	popr(   rA   rx   rC   r   rB   r,   r-   )r   r!   r    r'   ro   resr.   s          r   r|   Font.metrics   s    
 FF;-	 ),D))G,,D88??

69dii?$?A A ++djjDIIMMNCG1c#h*&*hhoocA#h&?Aqr
# +Nr   )rC   rB   rA   r>   r   )NNNFNNrG   )__name__rP   rQ   __firstlineno____doc__	itertoolscountr=   r$   r(   r/   rD   rI   rR   rX   r]   rb   rg   rj   r4   r[   rr   r5   rw   r|   __static_attributes__r`   r   r   r   r      ss    * ooa G>)A
'/
MCF IPr   r   c                     U c  [         R                  " S5      n SnU(       a  SU4nU R                  R                  U R                  R                  " SS/UQ76 5      $ )zGet font families (as a tuple)zuse font.families()r`   rm   r3   r	   r7   r8   r2   r:   r;   )r   ro   r'   s      r   r	   r	      sS    |(()>?Di(77TWW\\&*DtDEEr   c                     U c  [         R                  " S5      n U R                  R                  U R                  R	                  SS5      5      $ )z'Get names of defined fonts (as a tuple)zuse font.names()r3   r
   r   )r   s    r   r
   r
      s<    |(();<77TWW\\&':;;r   __main__times   )familysizeweightr   r   hello	linespace)ro   )Courier   r   )r3   zHello, world)ry   r3   zQuit!)ry   commandr3   )r   rG   r   )r   r7   __version____all__r   r   r   r   r   r   r	   r
   r   Tkr   fprintr4   rr   r[   rw   r|   LabelwpackButtondestroyrj   fbmainloopr`   r   r   <module>r      s    6 
		3[ [|F< z::<D 	G"V4A	!((*	!((8
	!((8
	!((*	!&&
	!&&
	%'N	!))G
aii45	!))d)
#$)*A	!))G
aiitiDEda8AFFHt'4<<@AFFH	1V9		"	"	$BIITIHH"HG r   