FS#66012 - Remove fontconfig and xorg-mkfontscale dependencies from font packages

Attached to Project: Arch Linux
Opened by xduugu (xduugu) - Saturday, 28 March 2020, 22:11 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 30 June 2020, 09:40 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To freswa (frederik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
According to the Font package guidelines[1], it is no longer necessary to add a dependency on fontconfig or xorg-mkfontscale. For some fonts, there were already requests to remove these dependencies ( FS#66005 ), so here is a list of (hopefully) all affected packages that could be used to create a TODO entry.

[1] https://wiki.archlinux.org/index.php/Font_packaging_guidelines#Dependencies

The list was generated by this command:
pacman -Fqx '\.(o|t)tf' | expac -S '%n %E' - | sort | grep -e fontconfig -e xorg-mkfontscale | sed 's/ .*$//'

These packages were manually removed, because they look like false positives:
ardour
ghostscript
grafana
grafx2
lilypond
qt5-base
vlc

The list of affected font packages:

adobe-source-han-sans-cn-fonts
adobe-source-han-sans-hk-fonts
adobe-source-han-sans-jp-fonts
adobe-source-han-sans-kr-fonts
adobe-source-han-sans-tw-fonts
adobe-source-han-serif-cn-fonts
adobe-source-han-serif-jp-fonts
adobe-source-han-serif-kr-fonts
adobe-source-han-serif-tw-fonts
awesome-terminal-fonts
font-bh-ttf
font-mathematica
opendesktop-fonts
otf-cormorant
otf-fantasque-sans-mono
otf-fira-mono
otf-fira-sans
otf-font-awesome
otf-ipaexfont
otf-ipafont
otf-ipamjfont
otf-latin-modern
otf-latinmodern-math
otf-overpass
ttf-anonymous-pro
ttf-baekmuk
ttf-bitstream-vera
ttf-cascadia-code
ttf-cormorant
ttf-dejavu
ttf-fantasque-sans-mono
ttf-fira-mono
ttf-fira-sans
ttf-font-awesome
ttf-hack
ttf-hanazono
ttf-hannom
ttf-ibm-plex
ttf-indic-otf
ttf-jetbrains-mono
ttf-joypixels
ttf-junicode
ttf-khmer
ttf-linux-libertine-g
ttf-nerd-fonts-symbols
ttf-opensans
ttf-proggy-clean
ttf-roboto
ttf-roboto-mono
ttf-sazanami
ttf-tibetan-machine
xorg-fonts-misc
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Tuesday, 30 June 2020, 09:40 GMT
Reason for closing:  Fixed
Comment by xduugu (xduugu) - Sunday, 29 March 2020, 22:07 GMT
I've just noticed that there are font packages which depend on xorg-font-utils[1] instead of xorg-mkfontscale, so this dependency could be removed as well. The list above is still up-to-date, because the font packages depending on xorg-font-utils were already included.

[1] https://www.archlinux.org/packages/extra/any/xorg-font-utils/
Comment by Chih-Hsuan Yen (yan12125) - Monday, 30 March 2020, 10:39 GMT
The list does not contain font packages that depend on fontconfig only. Examples are ttf-arphic-{ukai,uming}.

See also the discussion thread [1] and another similar feature request [2].

[1] https://lists.archlinux.org/pipermail/arch-dev-public/2020-March/029931.html
[2] https://bugs.archlinux.org/task/59164
Comment by xduugu (xduugu) - Monday, 30 March 2020, 13:40 GMT
Good catch! The list only includes packages that contain files ending with .ttf or .otf. The packages you mentioned apparently use a "TrueType Collection" which has the file extension .ttc[1]. I'm sure there are more packages that are not included, but as far as I know, there is no easy way to identify all font packages. Therefore, I would suggest to first fix the packages in the list and afterwards manually check the packages that still depend on fontconfig / xorg-mkfontscale / xorg-font-utils for missed font packages.

[1] https://www.archlinux.org/packages/community/any/ttf-arphic-ukai/files/
Comment by Caleb Maclennan (alerque) - Monday, 30 March 2020, 13:41 GMT
Yes please, this is long overdue. On most desktop systems this won't matter because people are going to have those packages for other reasons. Anything that uses fonts via fontconfig or any system with X will have the right packages and hence hooks.

However there are things you can do with fonts that don't involved fontconfig and even more than don't involve X! Having these dependencies makes it really cumbersome to create lightweight containers for specific purposes. I don't want my CI tooling that uses a font for something to need xorg or fontconfig and the heft they bring unless I specifically need them for some reason. Having these unnecessary deps dropped across the official repos will also make it easier to convince AUR maintainers to stop including them.
Comment by xduugu (xduugu) - Thursday, 25 June 2020, 21:39 GMT
Unfortunately, the discussion on the mailing list ended without a decision [1]. How can we proceed with this request?

[1] https://lists.archlinux.org/pipermail/arch-dev-public/2020-March/029935.html
Comment by Eli Schwartz (eschwartz) - Thursday, 25 June 2020, 21:56 GMT
By assuming it's time to proceed, I guess. :D

Due to lack of objections I've posted to arch-dev-public with my intent to implement this tonight.
Comment by Eli Schwartz (eschwartz) - Friday, 26 June 2020, 02:57 GMT Comment by nl6720 (nl6720) - Friday, 26 June 2020, 06:24 GMT
The TODO is missing bitmap fonts:

extra/bdf-unifont
community/dina-font
community/tamsyn-font
community/terminus-font
community/terminus-font-otb
Comment by Andreas Radke (AndyRTR) - Monday, 29 June 2020, 15:03 GMT
Is there anything left? All packages from Todo Lists have been fixed.
Comment by xduugu (xduugu) - Tuesday, 30 June 2020, 09:08 GMT
Thanks Eli for setting up the Todo list and everyone involved for fixing the font packages.

I have found two more packages that still depend on fontconfig and are missing from the Todo list, because they contain fonts in some uncommon font formats:
- font-bitstream-speedo [1]: fonts use file extension .spd
- terminus-font-otb [2]: fonts use file extension .otb

According to Wikipedia[3], Speedo is "an obsolete scale font format" and support for it was "removed from X in the X11R7.0 release in 2005". In my understanding, the package font-bitstream-speedo is of little use today and could be dropped, but I may be wrong.

[1] https://www.archlinux.org/packages/extra/any/font-bitstream-speedo/
[2] https://www.archlinux.org/packages/community/any/terminus-font-otb/
[3] https://en.wikipedia.org/wiki/Bitstream_Speedo_Fonts
Comment by Andreas Radke (AndyRTR) - Tuesday, 30 June 2020, 09:40 GMT
Removed package font-bitstream-speedo.
Fixed terminus-font-otb.

Loading...