Joined: 09 May 2005
|Posted: Thu May 18, 2017 8:33 pm Post subject: Blurry fonts in Qt5 applications
|Earlier this week I did a full world update on mostly stable amd64, which among others included KDE Plasma (my DE of choice) updates from 16.08 to 16.12, as well as a freetype update from 2.6.3 to 2.8, but no update to Qt5.
Mid update I noticed that newly opened Konsoles started having blurry fonts in the menu area (but not the terminal area, I use a bitmap font there, so no AA or hinting), I didn't think much of it at the time and figured it would fix itself by the end of the update, but unfortunately I was wrong.
When I first logged into the new KDE install, I noticed that *everything* had blurry fonts, which I was able to trace that down to the newer version of freetype defaulting to USE=+cleartype_hinting. Rebuilding freetype with -cleartype_hinting fixed the issue for Firefox and Qt4 applications, as well as (at the time) newly started Konsoles. However, after I restarted KDE to fully clear out the blurry fonts, they came back for all Qt5 applications (only)! At this point, no matter what I do with freetype (roll all the way back to 2.6.3, build with +bindist -cleartype_hinting), all Qt5 applications stay blurry.
I have tried adjusting the font AA setting in KDE to "Disabled", "Enabled" (with both "on" and "off" for the detailed options), none of which appears to make any difference at all.
So you can see what I'm talking about, compare Qt4 KMail and Qt5 KWrite, for example: http://imgur.com/a/Pvpei
Is there any way to restore the non-blurry fonts for Qt5 applications as they used to be, or at least figure out where they're coming from?
Update: I stumbled upon x11-misc/qt5ct, which does appear to have some influence over how Qt5 applications render fonts. I'm still fiddling with it, but it seems that no matter what settings I pick, fonts appear much bolder (ie, thicker) than they do in Qt4 applications, even at the same size and style. Having said that, Qt5 fonts are looking a bit better than they did before now, so it's not a total loss.
Note that the first time you run qt5ct, it will probably fail. Try a
first, and then it should work, future invokations of qt5ct don't appear to need this.
|export QT_QPA_PLATFORMTHEME=qt5ct |
[Moderator edit: Moved poster's self-response into main post, then deleted that self-response to return the thread to the unanswered list.
OP: Generally, if post length permits, you should edit extra information into your first post instead of replying to it. Some users run a canned search for threads with zero replies as a way of finding posts to answer. When you replied to yourself, you removed your thread from that list, even though you were not replying to announce that the thread was solved. Thus, they would no longer see your thread on the list of unanswered threads.
Game! - Where the stick is mightier than the sword!