Registering fonts with GNOME
Recently, I've been doing some non-maintainer work on gnumeric. A recurring
issue with gnumeric is that for some it complains about not being able to
find fonts like Helvetica. I'd like to fix this The Right Way (tm), so here
is a little analysis and a suggestion for a solution on which I'd appreciate
Gnumeric uses libgnomeprint for its font handling. libgnomeprint which
implements the Gnome printing architecture
(http://www.levien.com/gnome/print-arch.html), which employs
/usr/share/fonts/fontmap2 as its font registry. Unfortunately, it appears
that the only time that file is constructed or updated is in
libgnomeprint-data's postinst, using a fairly obscurely located script:
if [ "$1" = configure ]; then
printf "Check /var/log/libgnomeprint-install.log for installation information"
perl /usr/share/doc/libgnomeprint-data/run-gnome-font-install \
/usr/bin/gnome-font-install /usr/share /usr/share 2> /var/log/libgnomeprint-install.log >/var/log/libgnomeprint-install.log
Thus, when font packages (like the "gsfonts" on which gnumeric now depends)
are installed after libgnomeprint-data has been installed, their fonts are
not seen by applications using libgnomeprint. Installing a font package
should IMHO trigger registration of the fonts involved, including for use by
the GNOME printing architecture.
A good way to deal with this would be to
- have a "/usr/sbin/update-gnome-fontmap" in "libgnomeprint-bin" that
handles updating of fontmap2 (probably by using the "run-gnome-font-install"
- have defoma Suggests: libgnomeprint-bin
- change defoma to run /usr/sbin/update-gnome-fontmap, if available.
This way, libgnome-print using applications like Gnumeric need only have a
Depends: on the font packages required, which, via defoma, will take care of
their registration for the GNOME printing architecture.
Tevens ben ik van mening dat Nederland overdekt dient te worden.