Title: Different pixel-specified font sizes in tkinter · Issue #143990 · python/cpython · GitHub
Open Graph Title: Different pixel-specified font sizes in tkinter · Issue #143990 · python/cpython
X Title: Different pixel-specified font sizes in tkinter · Issue #143990 · python/cpython
Description: Bug report Bug description: import tkinter as tk import tkinter.font as tkfont root = tk.Tk() font_tuple = ("Calibri", -14) font = tkfont.Font(root, font_tuple) lb1 = tk.Label(root, text="Hello", font=font_tuple) lb1.pack() lb2 = tk.Labe...
Open Graph Description: Bug report Bug description: import tkinter as tk import tkinter.font as tkfont root = tk.Tk() font_tuple = ("Calibri", -14) font = tkfont.Font(root, font_tuple) lb1 = tk.Label(root, text="Hello", f...
X Description: Bug report Bug description: import tkinter as tk import tkinter.font as tkfont root = tk.Tk() font_tuple = ("Calibri", -14) font = tkfont.Font(root, font_tuple) lb1 = tk.Label(root, text=...
Opengraph URL: https://github.com/python/cpython/issues/143990
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Different pixel-specified font sizes in tkinter","articleBody":"# Bug report\n\n### Bug description:\n\n```python\nimport tkinter as tk\nimport tkinter.font as tkfont\n\nroot = tk.Tk()\n\nfont_tuple = (\"Calibri\", -14)\nfont = tkfont.Font(root, font_tuple)\n\nlb1 = tk.Label(root, text=\"Hello\", font=font_tuple)\nlb1.pack()\nlb2 = tk.Label(root, text=\"Hello\", font=font)\nlb2.pack()\n\nroot.update()\nprint(lb1.winfo_width(), lb1.winfo_height())\nprint(lb2.winfo_width(), lb2.winfo_height())\n\nroot.mainloop()\n```\nThe font size differs between tuples and Font objects.\nThe documentation states it can be specified in pixels, but is this a bug?\n\n\n### CPython versions tested on:\n\n3.14\n\n### Operating systems tested on:\n\nWindows\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-143992\n* gh-152025\n* gh-153267\n* gh-153322\n* gh-153323\n* gh-153341\n* gh-153342\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Kawasaki5963","@type":"Person","name":"Kawasaki5963"},"datePublished":"2026-01-18T08:23:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/143990/cpython/issues/143990"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bb5c7040-e7bc-5fda-4f21-27282f85bcc3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EAB4:1258BB:B1C26E:F0D4EE:6A5317F6 |
| html-safe-nonce | e3c50a09e77de9a7a500d09d270670d0201a886ebd072262491e2eb7a982872f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUI0OjEyNThCQjpCMUMyNkU6RjBENEVFOjZBNTMxN0Y2IiwidmlzaXRvcl9pZCI6IjUxMjkyNDUwMDIyNDIwMzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c25978a83d2cbe956db7be93868a40d84f3b29b67ca56bd8ed3f020d56fca540 |
| hovercard-subject-tag | issue:3826501654 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/143990/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0b0155bf0947b6a61f3548729b1eea75192f376b956b753339e29cad890f96db/python/cpython/issues/143990 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0b0155bf0947b6a61f3548729b1eea75192f376b956b753339e29cad890f96db/python/cpython/issues/143990 |
| og:image:alt | Bug report Bug description: import tkinter as tk import tkinter.font as tkfont root = tk.Tk() font_tuple = ("Calibri", -14) font = tkfont.Font(root, font_tuple) lb1 = tk.Label(root, text="Hello", f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Kawasaki5963 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width