Bug 431428 - Hinting Cannot Change from Slight
Summary: Hinting Cannot Change from Slight
Status: RESOLVED DUPLICATE of bug 437081
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fonts (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-11 10:30 UTC by Jerry Williams
Modified: 2021-05-30 21:43 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Example fontconfig file (532 bytes, text/plain)
2021-01-11 10:30 UTC, Jerry Williams
Details
before.fonts.conf (1.69 KB, text/plain)
2021-01-15 17:52 UTC, Jerry Williams
Details
after.fonts.conf (1.90 KB, text/plain)
2021-01-15 17:53 UTC, Jerry Williams
Details
fc-match -v (2.62 KB, text/plain)
2021-02-04 23:01 UTC, Jerry Williams
Details
New crash information added by DrKonqi (3.06 KB, text/plain)
2021-05-26 22:49 UTC, Vladislav
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jerry Williams 2021-01-11 10:30:22 UTC
Created attachment 134734 [details]
Example fontconfig file

SUMMARY

In System Settings, the hinting style cannot be changed from "Slight".

Applying the changes and restarting the app reverts the field to "Slight".

The only way to change this was to set a value in a fontconfig file first (either ~/.config/fontconfig/fonts.conf or /etc/fonts/fonts.conf).

I don't know if its intended to, but setting "Xft.hintstyle" in an X resource has no effect.


STEPS TO REPRODUCE
1.  Remove any file in /etc/fonts/conf.d that contains "hintstyle" and the hintstyle section in ~/.config/fontconfig/fonts.conf
2.  Set (System Settings -> Fonts -> Fonts -> Hinting) to "Medium"
3.  Apply
4.  Close
5.  Observe (System Settings -> Fonts -> Fonts -> Hinting) is "Slight"
6.  Observe "hintstyle" does not appear in ~/.config/fontconfig/fonts.conf
7.  Link a fontconfig file that sets "hintstyle" `sudo ln -s /etc/fonts/conf.avail/10-hinting-none.conf /etc/fonts/conf.d/` (example attached)
8.  Set (System Settings -> Fonts -> Fonts -> Hinting) to "Full"
9.  Apply
10. Close
11. Observe (System Settings -> Fonts -> Fonts -> Hinting) is "Full"
12. Observe "hintstyle" does not appear in ~/.config/fontconfig/fonts.conf
13. Repeat steps 1 - 5

OBSERVED RESULT

The setting cannot change when the setting has not been set by fontconfig files.

EXPECTED RESULT

The setting should change even if no fontconfig files set the value.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux (5.10.5-arch1-1)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0 
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Justin Zobel 2021-01-14 02:55:37 UTC
I'm unable to replicate this. I opened Fonts in System Settings, changed the Hinting to Medium, hit Apply, Closed System Settings.

When I re-opened the Fonts section of System Settings it was still set on Medium.

Tested via git build.
Comment 2 Nate Graham 2021-01-14 05:02:52 UTC
Works for me too with my system's fontconfig, but the interaction of the KCM with the fontconfig file is such that it might be theoretically possible if the fontconfig file is configured a certain way. Need to re-test with the file that Jerry has provided.
Comment 3 Justin Zobel 2021-01-15 06:42:43 UTC
Jerry, are you able to please test with a new user account to ensure there's no user-specific configuration causing the issue?
Comment 4 Jerry Williams 2021-01-15 17:52:55 UTC
Created attachment 134904 [details]
before.fonts.conf
Comment 5 Jerry Williams 2021-01-15 17:53:18 UTC
Created attachment 134905 [details]
after.fonts.conf
Comment 6 Jerry Williams 2021-01-15 17:54:06 UTC
I can reproduce this with a new user.

I only have Arch systems (x86-64 Arch and PineBook's ARM Manjaro) to test this on.
By default, they do not ship any config file linked (10-hinting-{full,medium,none,slight}.conf).
That's how I ran into this to begin with.

Manually configuring EITHER the local or global fontconfig files reliably allows me to change the setting afterwards in the GUI.

If NEITHER the local nor global fontconfig files set hintstyle, changes to the Hinting setting in the GUI are reliably not saved.

I've included the local fontconfig file generated by System Settings after step 6 (before.fonts.conf) and after step 11 (after.fonts.conf).

Steps:
1. Delete the link /etc/fonts/conf.d/10-hinting-none.conf which is the only global setting that sets hintstyle
2. Create a new administrator user via System Settings -> Users -> Add New User
3. Log out and log into the new user
4. Observe that ~/.config/fontconfig/fonts.conf file does NOT exist
5. Observe that the hint style is "Slight" in System Settings -> Fonts
6. Change the hint style to "Full"
7. Close and reopen System Settings
8. Observe the hint style is still "Slight"
9. Re-link the file `ln -s /etc/fonts/conf.avail/10-hinting-none.conf /etc/fonts/conf.d/`
10. Observe that the hint style is "None" in System Settings -> Fonts
11. Change the hint style to "Full" in System Settings -> Fonts
12. Close and reopen System Settings
13. Observe the hint style is now "Full"
Comment 7 Nate Graham 2021-01-20 01:33:58 UTC
Thanks for the information!
Comment 8 Nate Graham 2021-02-04 15:52:13 UTC
Can you paste the output of `fc-match -v`? Thanks!
Comment 9 Jerry Williams 2021-02-04 20:03:38 UTC
Under what conditions?
When the GUI is able to change the setting or when it is unable to?
Comment 10 Nate Graham 2021-02-04 20:26:04 UTC
While the bug is manifesting.
Comment 11 Jerry Williams 2021-02-04 23:01:32 UTC
Created attachment 135430 [details]
fc-match -v
Comment 12 Bug Janitor Service 2021-02-19 04:33:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 soredake 2021-02-26 17:44:56 UTC
https://bugs.kde.org/show_bug.cgi?id=416140
Comment 14 Vladislav 2021-05-26 22:49:36 UTC
Created attachment 138818 [details]
New crash information added by DrKonqi

systemsettings5 (5.21.5) using Qt 5.15.2

- What I was doing when the application crashed:

I was simply browsing the system settings, I was trying to change the sub-pixel rendering. Sometimes it gets set to chosen value, but reverts to RGB after restarting the app, and sometimes it causes system settings to crash.

- Custom settings of the application:
none.

-- Backtrace (Reduced):
#4  0x00007fb3d1ee9ed4 in QWaylandClientExtensionPrivate::handleRegistryGlobal(void*, wl_registry*, unsigned int, QString const&, unsigned int) () from /lib64/libQt5WaylandClient.so.5
#5  0x00007fb3d1ed63e9 in QtWaylandClient::QWaylandDisplay::registry_global(unsigned int, QString const&, unsigned int) () from /lib64/libQt5WaylandClient.so.5
#6  0x00007fb3d1ef2783 in QtWayland::wl_registry::handle_global(void*, wl_registry*, unsigned int, char const*, unsigned int) () from /lib64/libQt5WaylandClient.so.5
#7  0x00007fb3cf883c04 in ffi_call_unix64 () from /lib64/libffi.so.6
#8  0x00007fb3cf883107 in ffi_call () from /lib64/libffi.so.6
Comment 15 David Edmundson 2021-05-30 21:43:50 UTC

*** This bug has been marked as a duplicate of bug 437081 ***