You are not logged in.

#51 2020-01-12 15:34:34

digitalone
Member
Registered: 2011-08-19
Posts: 328

Re: Konsole font rendering regression.

It's working fine to me. Try to force dpi specifying the right value also in kcmfont under systemsettings5.

If it won't work, then I think it's something wrong in Plasma font configuration. I disabled entirely KDE font management symlinking ~/.config/fontconfig to /dev/null.

Who did the new font configuration UI under systemsettings5 has no idea how to configure fonts under Linux, its design and concept is just wrong.

Configure fonts system wide under /etc/fonts as explained in the Arch Wiki, you only have to symlink a couple of files from /etc/fonts/conf.avail to /etc/fonts/conf.d consisting in enabling antialiasing, slight hinting and rgb subpixel filter. If you don't find the file for aliasing, write here, I'll paste it in another post.

Then, if you have set dpi properly specifying screen size in xorg config, you will have correct fonts in all Qt apps after a reboot.

To improve the result, install also freetype2-cleartype from AUR.

Last edited by digitalone (2020-01-12 15:40:03)

Offline

#52 2020-01-12 15:38:26

digitalone
Member
Registered: 2011-08-19
Posts: 328

Re: Konsole font rendering regression.

kero wrote:

3) I also tried using "export QT_AUTO_SCREEN_SCALE_FACTOR=0", which indeed makes the fonts look correctly. BUT I also noticed that with that "solution", white caracters look slightly green (I think you can notice that on the image posted by Potomac at 2020-01-10 13:35:48).

That could be the subpixel rendering filter which would be on an incorrect setting. You can try other values rather than rgb.

Offline

#53 2020-01-12 18:05:29

kero
Member
Registered: 2012-08-26
Posts: 40

Re: Konsole font rendering regression.

Thank you for your answer(s) digitalone. I already tried some of your solutions and the problem is still there. I'll try to reconfigure fontconfig by myself and run with it when I find time.

Meanwhile, I found some discussions about the issue in Qt's world. Looks like Hinting is disabled with scaling capability. Two relevant links there:

https://phabricator.kde.org/D26185
https://bugreports.qt.io/browse/QTBUG-80967

Last edited by kero (2020-01-12 18:06:05)

Offline

#54 2020-01-12 18:11:26

digitalone
Member
Registered: 2011-08-19
Posts: 328

Re: Konsole font rendering regression.

When I have time, I'll post all my symlinks in /etc/font/conf.d plus the xml file to enable antialiasing system-wide.

I don't think Qt can disable hinting if it's enabled on fontconfig. My Qt apps are looking good now.

Last edited by digitalone (2020-01-12 18:12:02)

Offline

#55 2020-01-12 19:12:09

digitalone
Member
Registered: 2011-08-19
Posts: 328

Re: Konsole font rendering regression.

So, config presets are in /etc/fonts/conf.avail/ as explained here.

In config fonder /etc/fonts/conf.d/ I have all symlinks to files already existing in /etc/fonts/conf.avail/, except for README (useless) and 12-antialiasing.conf which is missing in presets folder and I added it manually. I appended its content in the following blockquote:

[*@* conf.d]$ ls
10-hinting-slight.conf      50-user.conf                      69-urw-d050000l.conf
10-scale-bitmap-fonts.conf  51-local.conf                     69-urw-fallback-backwards.conf
10-sub-pixel-rgb.conf       57-dejavu-sans.conf               69-urw-fallback-generics.conf
11-lcdfilter-default.conf   57-dejavu-sans-mono.conf          69-urw-fallback-specifics.conf
12-antialiasing.conf        57-dejavu-serif.conf              69-urw-gothic.conf
20-unhint-small-vera.conf   60-generic.conf                   69-urw-nimbus-mono-ps.conf
25-unhint-nonlatin.conf     60-latin.conf                     69-urw-nimbus-roman.conf
30-metric-aliases.conf      62-google-crosextra-carlito.conf  69-urw-nimbus-sans.conf
35-lang-normalize.conf      65-fonts-persian.conf             69-urw-p052.conf
40-nonlatin.conf            65-nonlatin.conf                  69-urw-standard-symbols-ps.conf
45-generic.conf             66-noto-mono.conf                 69-urw-z003.conf
45-latin.conf               66-noto-sans.conf                 70-no-bitmaps.conf
46-noto-mono.conf           66-noto-serif.conf                70-noto-cjk.conf
46-noto-sans.conf           69-unifont.conf                   80-delicious.conf
46-noto-serif.conf          69-urw-bookman.conf               90-synthetic.conf
49-sansserif.conf           69-urw-c059.conf                  README
[*@* conf.d]$ cat 12-antialiasing.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
    <its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
  </its:rules>
 
  <description>Antialiasing</description>
  
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>

Tons of files are installed by other packages, i.e noto-fonts, dejavu, etc. The most important files are the first 5, from hinting to antialiasing.

Do you want full hinting? Delete existing hint conf file and symlink /etc/fonts/conf.avail/10-hinting-full.conf
Do you want subpixel bgr rather than rgb? Delete rgb file and symlink /etc/fonts/conf.avail/10-sub-pixel-bgr.conf
Don't you want subpixel? Delete previous one and symlink /etc/fonts/conf.avail/10-no-sub-pixel.conf

Then, in order to avoid Plasma interferences, symlink ~/.config/fontconfig to /dev null

To get font configuration in GTK apps and other applications not relying to fontconfig, install xorg-xrdb and xsettingsd

Make sure you have this two files in home directory

[*@* ~]$ cat .Xresources
Xft.dpi: 101
Xft.antialias: 1
Xft.rgba: rgb 
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.autohint: 0
Xft.lcdfilter: lcddefault
[*@* ~]$ cat .xsettingsd
Xft/DPI 103424
Xft/Antialias 1
Xft/RGBA "rgb"
Xft/Hinting 1
Xft/HintStyle "hintslight"

With .Xdefaults symlinked to .Xresources. My DPI is 101, so in .xsettingsd 101*1024 = 103424.

Finally, you just have to load these settings at session startup with two bash script in ~/.config/autostart-scripts/:

#!/bin/bash

xrdb -merge /home/yourusername/.Xresources
#!/bin/bash

xsettingsd

Environment variables QT_ENABLE_HIGHDPI_SCALING and QT_AUTO_SCREEN_SCALE_FACTOR not set. That works to me.

Last edited by digitalone (2020-01-13 13:41:30)

Offline

#56 2020-01-13 06:33:46

kero
Member
Registered: 2012-08-26
Posts: 40

Re: Konsole font rendering regression.

digitalone, thank you for all this long explanation. I must say, I never digged into fontconfig stuff (and generally, I always was lost about font questions...). Now it's a good occasion to clean all of this a little bit. I'll look into that.

Offline

#57 2020-01-13 08:58:56

digitalone
Member
Registered: 2011-08-19
Posts: 328

Re: Konsole font rendering regression.

kero wrote:

digitalone, thank you for all this long explanation. I must say, I never digged into fontconfig stuff (and generally, I always was lost about font questions...). Now it's a good occasion to clean all of this a little bit. I'll look into that.

I made a confusion with already existing folders in /etc/fonts on my system by old packages. I edited my previous post, now should be a little clearer.

font configuration is hard on Linux because many packages install their own options inside, and it seems that antialiasing preset is missing globally because it's intended to be set locally. But Arch Wiki is a good starting point to learn and when you know how it works, then you can build a persistent global configuration without the need of a local one that could only make damages because plasma developers introduced little issues with the new kcmfont UI.

The only thing that I didn't know was the incorrect DPI, but setting it right in xorg and modifying the fontsize in Plasma will solve the issue.

Offline

#58 2020-01-13 10:26:48

Potomac
Member
Registered: 2011-12-25
Posts: 526

Re: Konsole font rendering regression.

@digitalone : What kind of LCD monitor do you have ?

I have a 24 inch LCD monitor, 1920x1080 native resolution (connected to graphic card with a dvi cable, free driver radeon), as Kero : setting correct DPI doesn't solve my problem,

I use the workaround with QT_ENABLE_HIGHDPI_SCALING set to zero, fonts now are better rendered, except a slight green color on grey/white characters in konsole.

Last edited by Potomac (2020-01-13 10:27:29)

Offline

#59 2020-01-13 12:20:19

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: Konsole font rendering regression.

Potomac wrote:

I know this is only a workaround, but freetype2-infinality-remix may help. fonts now are better rendered, except a slight green color on grey/white characters in konsole.

I know this is only a workaround, but freetype2-infinality-remix from aur may help.

Last edited by kokoko3k (2020-01-13 12:20:32)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#60 2020-01-13 13:39:52

digitalone
Member
Registered: 2011-08-19
Posts: 328

Re: Konsole font rendering regression.

Potomac wrote:

@digitalone : What kind of LCD monitor do you have ?

I have a 24 inch LCD monitor, 1920x1080 native resolution (connected to graphic card with a dvi cable, free driver radeon), as Kero : setting correct DPI doesn't solve my problem,

I use the workaround with QT_ENABLE_HIGHDPI_SCALING set to zero, fonts now are better rendered, except a slight green color on grey/white characters in konsole.

A notebook with 15'' 1366x768px screen. Didn't set QT_ENABLE_HIGHDPI_SCALING environment variable.

Offline

#61 2020-01-13 16:05:52

Potomac
Member
Registered: 2011-12-25
Posts: 526

Re: Konsole font rendering regression.

And which graphic card do you use ? Nvidia or Amd ?
With propriarty driver ?

Offline

#62 2020-01-13 16:50:21

digitalone
Member
Registered: 2011-08-19
Posts: 328

Re: Konsole font rendering regression.

Potomac wrote:

And which graphic card do you use ? Nvidia or Amd ?
With propriarty driver?

ATI Radeon

Offline

#63 2020-01-15 20:15:44

Potomac
Member
Registered: 2011-12-25
Posts: 526

Re: Konsole font rendering regression.

A patch has been released, for the 5.14.1 branch of Qt (qt5-base package) :

https://codereview.qt-project.org/c/qt/qtbase/+/286420

It may solve the problem related to bug-80967, but I didn't test it.

https://bugreports.qt.io/browse/QTBUG-80967

Last edited by Potomac (2020-01-15 20:18:15)

Offline

#64 2020-01-16 08:28:12

dramforever
Member
Registered: 2020-01-08
Posts: 4

Re: Konsole font rendering regression.

I got larger than usual fonts after an update and QT_ENABLE_HIGHDPI_SCALING=0 also works around it. After asking at https://bbs.archlinux.org/viewtopic.php?pid=1881764 I was told it was a duplicate of this thread. I either missed or didn't see the same symptoms, so I'm here to ask: Is this the same issue? Should I follow this thread or is mine a separate problem?

Offline

#65 2020-01-16 09:00:25

LordChaos73
Member
From: .nl
Registered: 2008-11-11
Posts: 183

Re: Konsole font rendering regression.

dramforever wrote:

I got larger than usual fonts after an update and QT_ENABLE_HIGHDPI_SCALING=0 also works around it. After asking at https://bbs.archlinux.org/viewtopic.php?pid=1881764 I was told it was a duplicate of this thread. I either missed or didn't see the same symptoms, so I'm here to ask: Is this the same issue? Should I follow this thread or is mine a separate problem?

I saw the same issue; I had no fuzzy fonts or whatever but I noticed some fonts were bigger than usual. Notably in Konsole & Dolphin. Exporting QT_ENABLE_HIGHDPI_SCALING=0 fixed the issue for me as well, although the variable was not set previously!? Looks like the functionality is enabled by default? Weird stuff this.
I do have a hidpi laptop panel & external monitor and I force the fonts dpi to their correct value depending on whether I use the internal screen or an external monitor (I never use both screens at the same time).

EDIT: spelling corrections

Last edited by LordChaos73 (2020-01-16 09:01:07)

Offline

#66 2020-01-17 05:22:41

dramforever
Member
Registered: 2020-01-08
Posts: 4

Re: Konsole font rendering regression.

LordChaos73 wrote:

Exporting QT_ENABLE_HIGHDPI_SCALING=0 fixed the issue for me as well, although the variable was not set previously!? Looks like the functionality is enabled by default? Weird stuff this.

This feature is not enabled by default but many KDE applications opt-in to it. Setting the environment variable overrides this.

Offline

Board footer

Powered by FluxBB