]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-143990: Allow tkinter.font.Font to wrap a font description (GH-152025)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 7 Jul 2026 09:37:04 +0000 (12:37 +0300)
committerGitHub <noreply@github.com>
Tue, 7 Jul 2026 09:37:04 +0000 (09:37 +0000)
commit2cd5b79284dd2331cbd9e11afabbfbf7e906103d
tree9223843b1ff3662fd0ede46e338d026fcb76b536
parentd066496d0b706618ffaf6ba2879ec8c07368eaed
gh-143990: Allow tkinter.font.Font to wrap a font description (GH-152025)

With exists=True and no name, Font now wraps the font description as is,
without creating a new named font, so that it is used without loss of
precision by actual(), measure() and metrics().  Its name attribute is then
the description rather than a string.  Keyword options now override the
corresponding settings of the given font instead of being ignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Doc/library/tkinter.font.rst
Doc/whatsnew/3.16.rst
Lib/test/test_tkinter/test_font.py
Lib/tkinter/font.py
Misc/NEWS.d/next/Library/2026-06-23-18-42-37.gh-issue-143990.o65v7O.rst [new file with mode: 0644]