Hmm - the main issue that I'd have here how this would effect GDM? As I remember, GDM had issues before where the font-cache was broken/out of date too.
Handling it post-login won't help if you can't get that far... Darren. Alan Coopersmith wrote: > Just in case anyone here is interested in changes being proposed to the > font management systems we get from the open source community. > > -Alan Coopersmith- alan.coopersmith at sun.com > Sun Microsystems, Inc. - X Window System Engineering > > -------- Original Message -------- > Subject: [Fontconfig] Font autoinstallation meeting > Date: Fri, 06 Jun 2008 15:06:51 -0400 > From: Behdad Esfahbod <behdad at behdad.org> > To: Richard Hughes <rhughes at redhat.com>, Nicolas Mailhot <nicolas.mailhot > at gmail.com> > CC: fontconfig <fontconfig at lists.freedesktop.org>, fedora-fonts-list > <fedora-fonts-list at redhat.com>, gtk-i18n-list <gtk-i18n-list at gnome.org> > > 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 > now: > > > - 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. > > > Discussion: > > - 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. > Then: > > - 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 :). > > > Cheers, > > behdad > > [1] http://mces.blogspot.com/2008/06/online-font-installation.html > > _______________________________________________ > Fontconfig mailing list > Fontconfig at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/fontconfig > _______________________________________________ > desktop-discuss mailing list > desktop-discuss at opensolaris.org
