Skip to content

[3.14] gh-143990: Preserve the size when creating a Font from a named font (GH-153267) (GH-153323)#153341

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-a9d4473-3.14
Jul 8, 2026
Merged

[3.14] gh-143990: Preserve the size when creating a Font from a named font (GH-153267) (GH-153323)#153341
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-a9d4473-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

tkinter.font.Font now copies the options of a named font (via "font
configure") instead of the options resolved by "font actual", which
would resolve a size specified in pixels (a negative size) to points.
A font description is still resolved, as it cannot be parsed otherwise.

Font.copy(), which has always been equivalent to constructing a Font
from the original font, is updated to match and now preserves the size
too.

(cherry picked from commit 45010f4)
(cherry picked from commit a9d4473)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

… named font (pythonGH-153267) (pythonGH-153323)

tkinter.font.Font now copies the options of a named font (via "font
configure") instead of the options resolved by "font actual", which
would resolve a size specified in pixels (a negative size) to points.
A font description is still resolved, as it cannot be parsed otherwise.

Font.copy(), which has always been equivalent to constructing a Font
from the original font, is updated to match and now preserves the size
too.

(cherry picked from commit 45010f4)
(cherry picked from commit a9d4473232f86d6dfc234756f633b8dc5836ad32)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 8, 2026 13:10
@serhiy-storchaka serhiy-storchaka merged commit d55a988 into python:3.14 Jul 8, 2026
49 checks passed
@miss-islington miss-islington deleted the backport-a9d4473-3.14 branch July 8, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants