Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

large GUI fonts in some QT applications.

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
diniwed
Posts: 6
Joined: 2017-09-16 18:51

large GUI fonts in some QT applications.

#1 Post by diniwed »

I intermittently use such applications as frescobaldi, TeXstudio etc. and I noticed that the "GUI fonts" (the ones in menus, sidebars, and other "decorations"...) have grown very large - c. 4 times the height/width they are in other applications.

This has happened fairly recently and after doing some research I am under the impression that this may be related to current versions of these applications (as shipped by debian stable - STRETCH) are using the new Qt5 toolkit that among other things would appear to address issues relative to the introduction of the new "very" high resolution displays.

With previous Qt versions a "Qt config" tool was provided that let you set a session-wide font size. From what I read here, there and everywhere, there is no such tool for Qt5... nor will there ever be one.

A possible workaround that I found unofficially advertised in various forums & wikis would appear to consist in setting an environment variable that globally scales all applications by a given factor, such as:

$ QT_AUTO_SCREEN_SCALE_FACTOR=0 frescobaldi 0

This variable appears to have changed name(s) at least twice... the sample above being to the best of my knowledge the latest brew.

Apart from the fact that I do not want to "scale" my display... just change the size of my "GUI" fonts... I must say that in my case... setting this variable to a value such as .5 (e.g.) does not work. In other words I am only able to make the fonts larger... not smaller.

I use neither of the popular DE's such as gnome/kde/xfce and this may have some be related.

I have lived with this annoyance for ~6 months so I guess is I could live with it for a bit longer. So this is not such a big deal at this point... although I prefer working on a "clean" desktop rather than the mess I now see. My main concern is that other Qt5 applications such as the okular pdf viewer that I use on a regular basis will eventually be affected.

I was wondering if anyone else is having this issue with something comparable with my laptops display resolution of 1920x1200, ~130 dpi and if they have found a workaround.

Thank you for your continued support of Joe User in these troubled times.

CJ

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: large GUI fonts in some QT applications.

#2 Post by debiman »

are these applications all qt4, or all qt5, or something else?
maybe this can be helpful: https://wiki.archlinux.org/index.php/Qt

Innovate
Posts: 188
Joined: 2015-12-27 01:28

Re: large GUI fonts in some QT applications.

#3 Post by Innovate »

diniwed wrote:I intermittently use such applications as frescobaldi, TeXstudio etc. and I noticed that the "GUI fonts" (the ones in menus, sidebars, and other "decorations"...) have grown very large - c. 4 times the height/width they are in other applications.

This has happened fairly recently and after doing some research I am under the impression that this may be related to current versions of these applications (as shipped by debian stable - STRETCH) are using the new Qt5 toolkit that among other things would appear to address issues relative to the introduction of the new "very" high resolution displays.

With previous Qt versions a "Qt config" tool was provided that let you set a session-wide font size. From what I read here, there and everywhere, there is no such tool for Qt5... nor will there ever be one.
I've gotten one. Is this what you're looking for?

Image Image Image

diniwed
Posts: 6
Joined: 2017-09-16 18:51

Re: large GUI fonts in some QT applications.

#4 Post by diniwed »

Thanks for pointing me in the right direction...

The application on the screenshots is qt5ct.

It is only available as a package in debian testing (buster) and sid... not debian stable (stretch). As of today the package is not in stretch/backports either.

I had given it a try some time ago but I ran into problems compiling from source. Since your screenshots looked rather promising I decided to give it another shot. This time I was successful.

One needs to do the following in debian/stretch (stable):

1. download the qt5ct zip file from github (click on the green "clone or download" button -> choose download zip file)

2. compile and install:

$ unzip qt5ct.zip
$ cd qt5ct-master
$ qmake PREFIX=/usr/local
$ make
# make install

• Check the README file in the qt5ct-master directory for a list of dependencies.
• I had to install the qtbase5-private-dev package... otherwise the make step fails
• Depending on your permissions (in my example you need write access to /usr/local) you may have to su to root or use sudo to run the make install command successfully...

3. set up the environment:

Before you run qt5ct and affected Qt5 applications you must set the following environment variable:

$ export QT_QPA_PLATFORMTHEME=qt5ct

The simple way to do this is to add the command to ~/.bash_profile and log out of your session and log back in.

4. run qt5ct and change the font and font size to your liking.

5. test

I checked the following Qt applications: okular, sigil, frescobaldi, kfontview, calibre, texstudio, lyx and everything looked OK.

Thanks again... can't tell you what a relief it is to have my desktop back to its normal state.

Priceless!

CJ

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: large GUI fonts in some QT applications.

#5 Post by stevepusser »

It's actually a piece of cake to backport this package from upstream: https://wiki.debian.org/SimpleBackportCreation
MX Linux packager and developer

diniwed
Posts: 6
Joined: 2017-09-16 18:51

Re: large GUI fonts in some QT applications.

#6 Post by diniwed »

Line one of the document:

"Please keep in mind that this is meant as a quick howto for how to build private backports and is not the way we expect from official backports for backports.debian.org. "

What is needed for those who like me are frankly allergic to so-called DE's aka gnome, kde, et al. is an official backport.

Something you can apt-get install in a jiffy and forget about…

This document is really about creating your own personal debian package and integrating it to your distro as opposed to the "rogue" compile-from-source procedure.

I've done that in the past for stuff where I needed to patch the source for my own needs and thanks to debian's rock-solid packaging system it did turn out to be a "piece of cake".

Having the backports maintainers actually create the backport making sure that it agrees with just about everyone's setup and add the package to their repository is a different matter.

But I'm not holding my breath.… this is only a small but (rather indispensable in my case) utility that I don't see catching the fancy of a "backporter" any time soon…!

The fact that buster, the current testing flavor of debian ships qt5ct is probably quite sufficient where I am concerned considering this is my home machine.

I just need to make a note that I have this non-official compiled version of qt5ct in /usr/local and get rid of it before I do my next dist-upgrade.

Come to think of it… I could probably remove it from my system right now… now that I have made my changes I am not likely to touch it again in the foreseeable future.

CJ

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: large GUI fonts in some QT applications.

#7 Post by stevepusser »

My intent was to show how one can often solve compilation problems like the one you said you encountered, simply by using the packaging system to backport a program not yet in your release. The unofficial package you get is very likely to be the same as an offical backport...there's no magic fairy dust that gets added to the official one.
MX Linux packager and developer

Post Reply