New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tkinter scaling does not work on some linux systems #87860
Comments
When using scaling (as in root.tk.call('scaling', somenum)), some linux systems appear to simply disregard the change. I recently reinstalled from Ubuntu to OpenSUSE Tumbleweed and found that scaling straight up did not work in the application I tried or the test application -- https://github.com/Athanasius/tk-scaling. (image attached) Tested on python 3.8.8 and 3.9.2 (pyenv) |
From "man font": FONT OPTIONS
If the font size is specified in absolute pixels the scaling factor does not affect it. See fix_scaling() in Lib/idlelib/run.py for example how to handle this problem. |
I wasnt referring to fonts, I was refering to window scaling in general, which includes widgets and other things. Which are _also_ not being scaled correctly. The example code doesnt mess with fonts at all either, which either means the default behaves in an unexpected manner, or just that as I said scaling just straight doesnt work. |
What did you expect to get? |
I'd expect the windows themselves to change size based on the percentage requested. eg as shown here https://user-images.githubusercontent.com/4589845/95577562-0a794500-0a3b-11eb-914e-9a5afc500b65.png (semirelated issue: EDCD/EDMarketConnector#750 ) |
The size of of the window is determined by the size of its components. The size of the label and the munu is determined by the size of the font. If font has the same size and you output the same string (or string containing characters of the same proportion) you will get windows with the same size. |
Okay that makes sense to me. But then my next question is, why does this work on some linux systems and not others without having a specified font? Something funky about the font size? because I'd expect the platform defaults to at least be the same on different linux systems. |
AFAIK X Window uses two font systems: for bitmap fonts and for scalable fonts. If default fonts on your system are bitmap fonts, they are not scaled. |
Thanks so much for your help. To anyone in the future trying to figure this out: Apparently the default opensuse fonts (which are noto) are _not_ scalable. In my testing the following is enough to solve the issue.
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: