On Tue, 2009-02-24 at 23:34 +0000, Caolán McNamara wrote:
On Tue, 2009-02-24 at 14:26 -0500, Matthias Clasen wrote:
Here is another F11 feature that will become complete enough to warrant testing in the next few days:
https://fedoraproject.org/wiki/Features/AutoFontsAndMimeInstaller
What's the technical kung-foo behind the auto-font stuff ? Might be good if OOo did it too, though sort of late now to do anything about it for F-11 if its intricate.
There is a loadable GTK+ module that hooks into the Pango fontmap to do the magic: /usr/lib/gtk-2.0/modules/libpk-gtk-module.so
From the README in PackageKit-0.4.0/contrib/gtk-module:
The GTK+ module is designed to be loaded using gnome-settings-daemon by the gnome-packagekit package.
It can however be launched for testing using:
GTK_MODULES="$GTK_MODULES:/usr/lib/gtk-2.0/modules/pk-gtk-module.so" application
The module installs a custom default pangocairo font map during gtk_init(). Pango will then call back with any languages which need installing, and these are queued up. In an idle callback these are emitted as an asyncronous D-BUS method to the session PackageKit InstallFonts() method.
If configured to do so, this will prompt the user to install new fonts.
So, if you are loading GTK+ modules and are using Pango to render fonts, you may be good already (of course, that would be too easy...).