Skip to content

Commit 9967465

Browse files
miss-islingtonserhiy-storchakaclaude
authored
[3.14] gh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH-153288) (GH-153330)
Explain the displayof argument of tkinter.font.Font.actual() and describe what Font.copy() returns, including for a wrapped font description. (cherry picked from commit fa5eafd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0a29ea5 commit 9967465

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Doc/library/tkinter.font.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ The different font weights and slants are:
5454
requested ones because of platform limitations.
5555
With no *option*, return a dictionary of all the attributes; if *option*
5656
is given, return the value of that single attribute.
57+
The attributes are resolved on the display of the *displayof* widget,
58+
or the main application window if it is not specified.
5759

5860
.. method:: cget(option)
5961

@@ -71,7 +73,11 @@ The different font weights and slants are:
7173

7274
.. method:: copy()
7375

74-
Return new instance of the current font.
76+
Return a distinct copy of the current font:
77+
a new named font with the same attributes but a different name,
78+
which can be reconfigured independently of the original.
79+
If the current font wraps a font description,
80+
the copy is instead a named font with its resolved attributes.
7581

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

0 commit comments

Comments
 (0)