Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

linux : UI and fonts really large on a 4k display #523

Closed
TTimo opened this issue Nov 27, 2017 · 8 comments
Closed

linux : UI and fonts really large on a 4k display #523

TTimo opened this issue Nov 27, 2017 · 8 comments

Comments

@TTimo
Copy link
Contributor

TTimo commented Nov 27, 2017

The UI and the fonts are very large when running on a 4k display. Is it possible to make it smaller? I haven't found working settings in preferences. See video:

https://www.dropbox.com/s/xxe95ggbjx23hkc/File%20Nov%2027%2C%2009%2023%2025.mov?dl=0

@egraether
Copy link
Contributor

We have some issues with highDPI screens on Linux (also #518). I did some research and found possible solutions (source).

Please try fixing this by setting the environment variable QT_AUTO_SCREEN_SCALE_FACTOR before running Sourcetrail:

export QT_AUTO_SCREEN_SCALE_FACTOR=1

If that doesn't work please try to set QT_SCALE_FACTOR:

export QT_SCALE_FACTOR=2

Please let me know if that changed anything and how.

@egraether
Copy link
Contributor

Found more info on ArchLinux Wiki. The info in the Note box might be related to your case:

Note:

  • If you manually set the screen factor, it is important to set QT_AUTO_SCREEN_SCALE_FACTOR=0 otherwise some applications which explicitly force high DPI enabling get scaled twice.
  • QT_SCALE_FACTOR scales fonts, but QT_SCREEN_SCALE_FACTORS does not scale fonts.
  • If you also set the font DPI manually in xrdb to support other toolkits, QT_SCALE_FACTORS will give you huge fonts.

@TTimo
Copy link
Contributor Author

TTimo commented Nov 29, 2017

Thanks. Observations so far:

Text appears in three contexts: menus (Project/Edit/View etc.), dialogs (such as the preferences and project loading dialog) and project windows (Code, Status, Search).

  • If I set the Font Size to 6 in the preferences dialog, then the font sizes in the project windows are the right size. That corresponds to setting Font Size to 12 on a smaller screen basically.

The menus are normal sized as well, but the dialogs are blown up twice as big as they should be. Overall that's the best setup and it's usable.

  • QT_AUTO_SCREEN_SCALE_FACTOR does nothing (tried 1, 2, 0.5 values)

  • QT_SCALE_FACTOR=2 blows everything up bigger.

  • QT_SCALE_FACTOR=0.5 makes the dialogs the right size, but menus and project windows all shrink. I can fix the project windows by bringing back the font size to 12, but the menus remain illegibly small so that's not an option.

Hope this helps!

@egraether egraether self-assigned this Dec 1, 2017
@egraether
Copy link
Contributor

Thank you for giving it a try!

I think I will need to provide you a build with more log information and command line options to get to the bottom of this.

@sasq64
Copy link

sasq64 commented Dec 6, 2017

Same issue here, but note that these errors are reported for me (on a fresh Ubuntu 17.10):

Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number

@egraether
Copy link
Contributor

@TTimo Did you also try setting QT_SCREEN_SCALE_FACTOR = 0 as commented here in #518?

@egraether
Copy link
Contributor

@TTimo I added settings for defining the flags QT_AUTO_SCREEN_SCALE_FACTOR and QT_SCALE_FACTOR within the Preferences UI in our new release. Please download the new beta and give it a try:

screen shot 2018-01-16 at 10 52 48

Turning off Auto Scaling to DPI might fix your issue. Please let me know if that works. It is turned on by default, because this seems to be the right thing for most systems.

@TTimo
Copy link
Contributor Author

TTimo commented Apr 9, 2018

I have both auto scaling and scale factor set to 'system' in latest release, and don't have problems anymore. Thank you!

@TTimo TTimo closed this as completed Apr 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants