Bug 437623 - When I disable fonts in Font Management it also deletes the font files
Summary: When I disable fonts in Font Management it also deletes the font files
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fontinst (other bugs)
Version First Reported In: 5.21.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-24 18:59 UTC by tango2x
Modified: 2024-09-15 20:25 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tango2x 2021-05-24 18:59:39 UTC
I disabled (not deleted) some fonts in Font Management section and I noticed that the font files got deleted. I had to reinstall the packages to get the files back.


STEPS TO REPRODUCE
1. Make sure that the file exists actually: ex. /usr/share/fonts/caladea/Caladea-BoldItalic.ttf
2. Open System Settings > Global Theme > Font Management.
3. Select the font ex. "Caladea" > "Bold Italic".
4. Open the contextual menu and select "Disable". It will show a dialog asking for confirmation. Click "Disable" button. It will ask PolicyKit for your password so enter it. It says "Finished. You need to restart..." so press "Close". Now you can see a forbidden sign next to the font name. That's normal.


OBSERVED RESULT
The font file has dissapeared.

EXPECTED RESULT
It should keep the font file because I just wanted to disable it, I didn't want to delete it.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
It adds the font to /etc/fonts/disabledfonts.xml as expected.
Comment 1 Nate Graham 2021-05-28 15:25:36 UTC
Cannot reproduce with current git master on top of Fedora 34. Disabling fonts adds them to /etc/fonts/disabledfonts.xml as expected, but does not delete them from /usr/share/fonts/.
Comment 2 tango2x 2022-05-25 10:23:43 UTC
My bug report is still valid a year later. Font Management in Plasma Preferences keeps removing from the filesystem the font files I disable.
KDE Plasma: 5.24.5
KDE Frameworks: 5.94.0
Qt: 5.15.4
Wayland

I'm giving up. I won't disable a font in Font Management anymore, I will add the font to /etc/fonts/disabledfonts.xml by hand instead.
Comment 3 Kisaragi Hiu 2024-09-15 20:25:16 UTC
I can reproduce, but this might be intended behavior doing something unexpected.

(Arch Linux, tracking git main branches)

- Take the font C059 for example, which exists in /usr/share/fonts:
   find /usr/share/fonts -name '*C059*' # => four file paths
- Go to kcm_fontinst, right click on C059, Disable, confirm, authenticate
- The files are no longer present
- Go back to kcm_fontinst, right click on C059, Enable, confirm, authenticate
- The files come back

Looking at kfontinst/dbus/FontInst.cpp, this seems to just be how it was implemented: by actually moving the files away to some other location.