FS#69093 - [xorg-mkfontscale] don't delete empty fonts.dir

Attached to Project: Arch Linux
Opened by Alexandre Bouvier (doskoi) - Friday, 25 December 2020, 02:19 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:16 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

xorg-mkfontscale.script should not delete empty fonts.dir because this file is needed in a directory to be accepted as a font path by xorg-server. A directory with no fonts is useful to create a custom fonts.alias for fonts installed elsewhere and avoid conflicts with other fonts.alias files provided by system packages (e.g. /usr/share/fonts/misc/fonts.alias provided by extra/xorg-fonts-alias-misc). A fonts.alias file in one font path can define aliases for fonts located in any other font paths.

xorg-mkfontscale.script source code:
find "$d"fonts.{scale,dir} -maxdepth 0 -size -3c -delete

xorg-server source code:
/*
* xf86ValidateFontPath --
* Validates the user-specified font path. Each element that
* begins with a '/' is checked to make sure the directory exists.
* If the directory exists, the existence of a file named 'fonts.dir'
* is checked. If either check fails, an error is printed and the
* element is removed from the font path.
*/

mkfontdir manual:
The file "fonts.alias", which can be put in any directory of the font-path, is used to map new names to existing fonts, and should be edited by hand.

/etc/X11/xorg.conf.d/custom.conf:
Section "Files"
FontPath "/usr/share/fonts/custom"
EndSection

/usr/share/fonts/custom/fonts.alias:
terminus -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1

The directory /usr/share/fonts/custom is not added to font paths because xorg-mkfontscale.script deletes his empty fonts.dir file.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:16 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/xorg-mkfontscale/issue s/1
Comment by Jan Alexander Steffens (heftig) - Friday, 25 December 2020, 17:48 GMT
Shouldn't you pick a folder outside of /usr/share/fonts for unpackaged files, like in /usr/local/share/fonts?
Comment by Alexandre Bouvier (doskoi) - Saturday, 26 December 2020, 09:13 GMT
Well, it is a packaged file. All my config is a package.
Beside, using /usr/share/fonts can leverage the auto upate mechanism instead of manually executing mkfontdir on /usr/local/share/fonts.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...