Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
font.cpython-314.pyc57 linesDownload Raw Back to __pycache__
1+
2��iX��3�^RIt^RItRt.ROtRtRtRtRtRRlt!R	R4t	RR4lt5RRlt]R8XEd�]P!4t]	!R
^]R7t]!]P#44]!]P#R44]!]P#R44]!]P%44]!]P'R44]!]P'R44]!]!44]!]P)R4]P+R44]!]P+]R74]	!RR7t]!]P)R4]P+R]R74]P,!]R]R7t]P14]P2!]R]P4R7t]P14]	!]R,R7P74t]P%]R7]P%]R7]P:!4R#R#)�Nz0.9�Font�normal�roman�bold�italicc��\VRVR7#)zFGiven the name of a tk named font, returns a Font representation.6    T)�name�exists�root)r)r	rs&&�Lib\tkinter\font.py�7nametofontr
s���T�$�T�2�2�c�a�]tRt^toRt]P!^4tRtRt	Rt8RRltRtRt
R	tR9tRtRtR
tRRltRtRt]tRRltRtRtVtR#)ra�Represents a named font.10 11Constructor options are:12 13font -- font specifier (name, system font, or (family, size, style)-tuple)14name -- name to use for this font configuration (defaults to a unique name)15exists -- does a named font by this name already exist?16   Creates a new named font if False, points to the existing font if True.17   Raises _tkinter.TclError if the assertion is false.18 19   the following are ignored if font is specified:20 21family -- font 'family', e.g. Courier, Times, Helvetica22size -- font size in points23weight -- font thickness: NORMAL, BOLD24slant -- font slant: ROMAN, ITALIC25underline -- font underlining: false (0), true (1)26overstrike -- font strikeout: false (0), true (1)27 28c��.pVP4F7wr4VPRV,4VP\V44K9	\V4#��-)�items�append�str�tuple)�self�kw�options�k�vs&&   r�_set�	Font._set2sE�����H�H�J�D�A��N�N�3�q�5�!��N�N�3�q�6�"���W�~�rc�^�.pVFpVPRV,4K	\V4#r)rr)r�argsrrs&&  r�_get�	Font._get9s+�����A��N�N�3�q�5�!���W�~�rc��/p\^\V4^4F"pW^,,W!V,R,&K$	V#)r��NN)�range�len)rrr�is&&  r�_mkdict�Font._mkdict?s9�����q�#�d�)�Q�'�A�#'�!��9�G��G�B�K� �(��rNc���Vf\P!R4p\VRV4pV'd$VPVP	RRV44pMVPV4pV'g&R\
\VP44,pW0n	V'd�RVn29VPVPVP	RR449d/\PPRVP:R24hV'd!VP!RR	VP.VO5!M'VP!RR30VP.VO5!RVn31W`n
VPVnVPVnR#)Nzuse font�tk�font�actualF�namesznamed font z does not already exist�	configure�createT)�tkinter�_get_default_root�getattr�	splitlist�callrr�next�counterr	�delete_font�_tkinter�TclError�_tk�_split�_call)rrr,r	r32rr+s&&&&&, r�__init__�
Font.__init__Es���<��,�,�Z�8�D�
�T�4��
&����<�<������$� ?�@�D��9�9�W�%�D���C��T�\�\� 2�3�3�D��	��$�D���y�y����R�W�W�V�W�-E� F�F��&�&�/�/�>B�i�i�I�K�K�������T�Y�Y�>��>��
�G�G�F�H�d�i�i�7�$�7�#�D�����l�l����g�g��33rc��VP#�N)r	�rs&r�__str__�Font.__str__ds���y�y�rc��RVPPRVPPRVP:R2#)�<�.z object �>)�	__class__�34__module__�__qualname__r	rBs&r�__repr__�
Font.__repr__gs<���4�>�>�,�,�-�Q�t�~�~�/J�/J�.K��$�)�)��a�)�	)rc��\V\4'g\#VPVP8H;'dVPVP8H#rA)�35isinstancer�NotImplementedr	r;)r�others&&r�__eq__�Font.__eq__ks=���%��&�&�!�!��y�y�E�J�J�&�@�@�4�8�8�u�y�y�+@�@rc�$�VPV4#rA)�cget)r�keys&&r�__getitem__�Font.__getitem__ps���y�y��~�rc�,�VP!R/W/BR#)N�)r/)rrV�values&&&r�__setitem__�Font.__setitem__ss�����&�#��&rc��VP'd VPRRVP4R#R# \dR#i;i)r,�deleteN)r8r=r	�	ExceptionrBs&r�__del__�Font.__del__vs>��	������36�37�6�8�T�Y�Y�7� ���	��	�s�5�5�A�Ac�J�\VP3/VP4B#)z*Return a distinct copy of the current font)rr;r-rBs&r�copy�	Font.copy}s���D�H�H�.����
�.�.rc	��RpV'dRV3pV'd2VRV,3,pVP!RRVP.VO5!#VPVPVP!RRVP.VO5!44#)zReturn actual font attributes�38-displayofrr,r-rZ)r=r	r(r<)r�option�	displayofrs&&& rr-�Font.actual�sy����� �)�,�D���3��<�*�*�D��:�:�f�h��	�	�A�D�A�A��<�<����D�J�J�v�x����J�T�J�K�M�
Mrc�L�VPRRVPRV,4#)zGet font attributer,�configr)r=r	)rrhs&&rrU�	Font.cget�s���z�z�&�(�D�I�I�s�6�z�B�Brc	���V'd2VP!RRVP.VPV4O5!R#VPVP	VPRRVP444#)zModify font attributesr,rlN)r=r	rr(r<)rrs&,rrl�Font.config�s^����J�J�v�x����
'��9�9�W�%�
'��<�<����D�J�J�v�x����C�D�F�
Frc��V3pV'dRW!3pVPPVP!RRVP.VO5!4#)zReturn text widthrgr,�measure)r;�getintr=r	)r�textrirs&&& rrq�Font.measure�s?���w��� �)�2�D��x�x���t�z�z�&�)�T�Y�Y�N��N�O�Orc��RpVPRR4pV'dRV3pV'dQW0PV4,pVPPVP!RRVP39.VO5!4#VP
VP!RRVP40.VO5!4p/p\^\V4^4F;pVPPWV^,,4WV,R,&K=	V#)zmReturn font metrics.41 42For best performance, create a dummy widget43using this font before calling this method.riNrgr,�metricsr#rZ)	�popr r;rrr=r	r<r%r&)rrrrri�resr's&*,    rrv�Font.metrics�s���44���F�F�;��-�	�� �)�,�D���)�)�G�,�,�D��8�8�?�?��45�46�6�9�d�i�i�?�$�?�A�
A��+�+�d�j�j���D�I�I�M��M�N�C��G��1�c�#�h��*��&*�h�h�o�o�c�A�#�h�&?��A��r�47�#�+��Nr)r=r<r;r8r	)NNNF�NNrA)�__name__rJrK�__firstlineno__�__doc__�	itertools�countr7rr r(r>rCrLrRrWr\rardr-rUrlr/rqrv�__static_attributes__�__classdictcell__)�
__classdict__s@rrrs{�����*�o�o�a� �G�����>�)�A�48�'��/�49M�C�F��I�P��rc���Vf\P!R4pRpV'dRV3pVPPVPP!RR.VO5!4#)zGet font families (as a tuple)zuse font.families()rgr,�familiesrZ�r1r2r+r4r5)rrirs&& rr�r��sS���|��(�(�)>�?��
�D���i�(���7�7���T�W�W�\�\�&�*�D�t�D�E�Erc��Vf\P!R4pVPPVPP	RR44#)z'Get names of defined fonts (as a tuple)zuse font.names()r,r.r�)rs&rr.r.�s<���|��(�(�);�<���7�7���T�W�W�\�\�&�'�:�;�;r�__main__�times)�family�size�weightr�r��hello�	linespace)ri)r,zHello, world)rsr,zQuit!)rs�commandr,)r�)�NORMAL�ROMAN�BOLD�ITALICr
rr�r.rArz)�Courier�r)r~r1�__version__�__all__r�r�r�r�r
rr�r.r{�Tkr�f�printr-rlrUrqrv�Label�w�pack�Button�destroyrd�fb�mainlooprZrr�<module>r�s�������6��50����	��	��3�[�[�|F�<��z���:�:�<�D�	
�G�"�V�4�A�	�!�(�(�*��	�!�(�(�8�51��	�!�(�(�8�52��	�!�(�(�*��	�!�&�&��53��	�!�&�&��54��	�%�'�N�	�!�)�)�G�55�a�i�i��4�5�	�!�)�)�d�)�56#�$��)�*�A�	�!�)�)�G�57�a�i�i��t�i�D�E��
�
�d��a�8�A��F�F�H����t�'�4�<�<�@�A��F�F�H�	
�1�V�9�	�	"�	"�	$�B��I�I�T�I���H�H�"�H������Gr
codekingpro/portable-devtools · Team Ai