Skip to content
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

Don't default to huge fonts of HiDpi systems #1281

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

lmoureaux
Copy link
Contributor

We have enabled Qt's transparent handling of HiDpi, and thus the manual scaling
that was done in configure_fonts() was useless. Worse, on HiDpi diplays, it
would choose larger fonts to make the UI bigger, which Qt also does internally.
This resulted in huge fonts on such systems.

Simply delete the scaling code. Use the opportunity to tidy up a bit.

See #1273.

We have enabled Qt's transparent handling of HiDpi, and thus the manual scaling
that was done in configure_fonts() was useless. Worse, on HiDpi diplays, it
would choose larger fonts to make the UI bigger, which Qt also does internally.
This resulted in huge fonts on such systems.

Simply delete the scaling code. Use the opportunity to tidy up a bit.

See longturn#1273.
@lmoureaux lmoureaux requested a review from jwrober August 15, 2022 02:06
@jwrober
Copy link
Collaborator

jwrober commented Aug 15, 2022

So this is better. Any way to make the font closer to 12 to 14pt, vs 16? Also I don't think help label has a default. Why is it size 9?

image

What about using more generic OS non-specific font names like monospace and sans serif. I see them available in Linux and Windows. If we are to ship font files, I suggest the Liberation set from LibreOffice. They are GNU v3 I think.

Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

@jwrober
Copy link
Collaborator

jwrober commented Aug 16, 2022

What about using more generic OS non-specific font names like monospace and sans serif. I see them available in Linux and Windows.

I stand corrected, these are not in Windows (at least not in a fresh install of Win10) so if we want more control, might want to think about shipping some font files. At least per wikipedia, Liberation fonts are OSS - https://en.wikipedia.org/wiki/Liberation_fonts

@lmoureaux
Copy link
Contributor Author

I'm not pretending to fix all font issues in this PR, just the super large fonts that appeared in some instances. I consider this a bug fix, even if related to #1273, since the defaults weren't applied correctly. Changing the defaults should be another PR IMHO. To bundle fonts, we'd need to change the Windows and Mac installers, which is an even wider scope.

@jwrober jwrober self-requested a review August 17, 2022 14:42
@jwrober jwrober merged commit 3a5a1b5 into longturn:master Aug 18, 2022
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