Skip to content

Commit fa5eafd

Browse files
gh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH-153288)
Explain the displayof argument of tkinter.font.Font.actual() and describe what Font.copy() returns, including for a wrapped font description. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 562606d commit fa5eafd

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
@@ -74,6 +74,8 @@ The different font weights and slants are:
7474
requested ones because of platform limitations.
7575
With no *option*, return a dictionary of all the attributes; if *option*
7676
is given, return the value of that single attribute.
77+
The attributes are resolved on the display of the *displayof* widget,
78+
or the main application window if it is not specified.
7779

7880
.. method:: cget(option)
7981

@@ -97,7 +99,11 @@ The different font weights and slants are:
9799

98100
.. method:: copy()
99101

100-
Return new instance of the current font.
102+
Return a distinct copy of the current font:
103+
a new named font with the same attributes but a different name,
104+
which can be reconfigured independently of the original.
105+
If the current font wraps a font description,
106+
the copy is instead a named font with its resolved attributes.
101107

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

0 commit comments

Comments
 (0)