Font autoinstallation meeting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi guys,

Lets meet Monday June 9th 17:00 UTC in ##fonts on freenode to discuss
font autoinstallation in Fedora.

I've recently committed patches to GTK+ and gnome-settings-daemon (the
latter not committed just yet, but expect to commit today or tomorrow)
to detect fontconfig configuration changes and react to it [1].  By
react, I mean:

  - Make fontconfig reread its configuration, seeing newly installed
fonts, changed configs, etc,
  - Make Pango fontmap drop its fontset caches,
  - Redraw all widgets.

With these in place, you can install a font rpm and all running
applications will pick it up withing 5 seconds.

Next logical step is to detect when fonts are missing for some language,
and let PackageKit offer installing them.  That's what I want to discuss
at the meeting.

To get us started, this is the very rough design I have in mind right

  - Hook into PangoFcFontMap's load_fontset method, and if the font
pattern for the first font in the just-loaded fontset does not cover the
asked language, signal missing fonts for language.

  - The signal will be propagated to PackageKit over D-BUS

  - PackageKit will show a notification suggesting to install fonts for
langauge.  In a further dialog it will list all font packages covering
the missing language(s?) and let user choose which ones to install.


  - I don't like making Pango do much.  My previous idea was to add a
missing-fonts hook in Pango that another module can hook into.  I don't
like that idea much now.  Hooks are in general very unscalable in the
long run.

  - Here's another way to handle it:  I'm going to make some changes to
PangoFontMap handling.  The part relevant here is that one can call
pango_cairo_font_map_set_default() to change the default font map.

  - PackageKit-gnome will install a gtk-module that upon loading, gets
the current pangocairo defaultfontmap, subclasses it anonymously (that's
perfectly possible), overrides the load_fontset method, creates an
instance of it, and sets it as the new default pangocairo fontmap.

  - The hook then is responsible for using D-BUS or any other means
(xsettings?!) to notify PackageKit of missing fonts and at that point
I'm done :).

For this to work, it's easiest if font packages provided names like
font-lang-fa, font-lang-fa_IR, font-lang-az_IR, etc.  We can develop a
script to automatically generate that at package build time.  Fontconfig
already has that list.

Anyway, further discussion during the meeting :).




Fontconfig mailing list

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux