Bug 413133 - Plasma always forces its own font configuration breaking system one
Summary: Plasma always forces its own font configuration breaking system one
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fonts (show other bugs)
Version: 5.17.0
Platform: Archlinux Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-18 09:34 UTC by Giusy Digital
Modified: 2022-06-14 16:47 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giusy Digital 2019-10-18 09:34:18 UTC
SUMMARY
Since the last upgrade on Arch Linux, Plasma Desktop is forcing it's own fontconfig on local settings.

In details, it is overwriting antialiasing 'on', hintslight and subpixel rendering 'rgb'. I'm aware that this is the optimal configuration in most cases, but there's also some particular cases where this configuration is not chosen by the user to due his/her specific system characteristics.

The bad behavior of this new upgrade is that even if I choose to NOT use kcm font settings, plasma keeps overwriting ~/.config/fontconfig/fonts.conf with its own options. This is also breaking my system-wide settings that I accurately wrote inside /etc/fonts/conf.d/ having the purpose to avoid to reconfig fonts for every user on my Linux installation.
In fact, having Plasma to use its local configuration made fonts looks very bad on my systems, especially inside GTK browsers like Firefox and Chromium.

The only way I can avoid this behavior is to symlink ~/config/fontconfig to /dev/null, which is unacceptable on a desktop environment like Plasma that claims to be highly customizable.
Doing that I got a good looking fonts having all applications to rely only on system fontconfig, like it should be in my specific context where I configured fonts directly in /etc/fonts and do NOT want others to interfere with it. 

STEPS TO REPRODUCE
1. By default Plasma Desktop write it's own options inside ~/config/fontconfig/fonts.conf
2. Disable options under fonts kcm (plasma systemsettings5)

OBSERVED RESULT
~/config/fontconfig/fonts.conf contains the default settings, which I don't want. Besides, If I empty it manually, Plasma will rewrite it when I relog into the session or enter into fonts kcm.

EXPECTED RESULT
Plasma should leave that file blank and does NOT have to interfere with system-wide configuration.

ADDITIONAL INFORMATIONS
I remember that font kcm had some options where you specified to leave the system configuration. It seems that these ones were removed? Why?

Besides, why antialiasing is enabling the other settings like subpixel rendering and hinting style? Do you know that these options are independent? Maybe I want to configure hints 'full' leaving antialiasing 'off'. But this is not intended to be done inside the kcm because disabling antialiasing is graying out the others. 

The concept is just wrong.
Comment 1 David Edmundson 2019-10-21 08:53:31 UTC
>The only way I can avoid this behavior is to symlink ~/config/fontconfig to /dev/null, which is unacceptable on a desktop environment like Plasma that claims to be highly customizable.

Your other option is to copy those defaults into /etc/xdg/kdeglobals 

Adding support for this is most of the rationale for removing vendor default. kdeglobals still supports setting the hintsettings to "notset" which will then not affect fontconfig.

IMHO, not a bug, other than maybe some documentation work.
Comment 2 Giusy Digital 2019-10-21 11:29:37 UTC
Not a bug? It broke my config and this should not be considered a bug?

When you broke something as a developer, do not expect the user to fix it in a configuration file. Please, fix it in the graphic interface. I think people uses Plasma Desktop to configure things by the graphic interface, not for writing in a text file because you chose a bad configuration as the default. 

There's also the issue that disabling the antialiasing in the kcm will gray out the other options, which is completely meaningless.
Comment 3 David Edmundson 2019-10-30 00:30:11 UTC
>I think people uses Plasma Desktop to configure things by the graphic interface,

Those people are not remotely affected. Only people who have modified configs manually at some  point anyway.

The issues comes from KDE having a simplified version of the settings and fontconfig having a super-duper blown mega complex config, which we couldn't possibly summarise in a UI. Then we're in a classic problem of having two sources of truth.

one solution we could do is make use of fontconfig cascading and put things in:
$XDG_CONFIG_HOME/fontconfig/conf.d/00-kde.conf  then we wouldn't risk overriding other files.

It means the KCM could occasionally lie, but only if a user has gone out of their way to do their own fonts meddling - at which point it's on them.

>There's also the issue that disabling the antialiasing in the kcm will gray out the other options, which is completely meaningless.

Yes. Though it's best if we don't mix up bug reports with multiple topics.
Comment 4 Giusy Digital 2019-10-30 09:00:14 UTC
First thing to do is to readd "leave system congif" which was previously present and don't know for what reason it was removed.

That could just resolve the issue leaving the local config file empty. Then writing kcm config in a separate config is a good idea also.
Comment 5 David Edmundson 2019-10-30 17:14:45 UTC
One thing that I can't follow is you say your fontconfig were changed just on it's own?

I can see how they're overwritten if you open and close the font KCM, but I can't see a path that syncs on startup.
Comment 6 Giusy Digital 2019-10-30 23:20:24 UTC
(In reply to David Edmundson from comment #5)
> One thing that I can't follow is you say your fontconfig were changed just
> on it's own?
> 
> I can see how they're overwritten if you open and close the font KCM, but I
> can't see a path that syncs on startup.

My system-wide fontconfig was not changed. Kcm keeps rewriting its own fontconfig and there's no way to keep it empty avoiding to override the system options. I noticed this behavior at the opening of the kcm and at the start of the session. In every case, the file emptied before was rewritten after. Maybe this is not a big issue for the majority of users, but it's not a good behavior.

Just write what the user choose in the kcm and give him/her the chance to keep it empty leaving the option to rely on system ones.