Skip to content
Open
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions Doc/library/tkinter.font.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,20 @@ The different font weights and slants are:

.. method:: actual(option=None, displayof=None)

Return the attributes of the font.
Returns the actual value for attributes when the given font is used on
the widget given by *displayof*. *displayof* accepts any tkinter widget
and, if omitted, will default to the main window (in most circumstances,
this will be your ``Tk`` instance).

Due to some differences between operating systems (such as pointsizes
and the availability of font families), some values returned by this
method may vary from those given as kwargs or similar method (and
retrieved by :meth:`Font.cget`).

If *option* is specified, the value of just that attribute is returned.
If it is omitted or ``None``, the returned value is a dictionary of all
the attributes and their values. See above for a list of acceptable
attributes.

.. method:: cget(option)

Expand All @@ -59,7 +72,7 @@ The different font weights and slants are:

.. method:: copy()

Return new instance of the current font.
Return new instance of the current font with a different *name*.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!


.. method:: measure(text, displayof=None)

Expand Down Expand Up @@ -93,4 +106,4 @@ The different font weights and slants are:

.. function:: nametofont(name)

Return a :class:`Font` representation of a tk named font.
Return a :class:`Font` representation of a tk named font.