Erik
2008-Aug-06 02:24 UTC
[Fontconfig] Make GTK+ apps (and Gnome) fully respect your .fonts.conf
Since this has bothered me for a long time, as I imagine it would anybody who likes to uber-tweak their .fonts.conf, I figured I would put it out there. Gnome and GTK+ apps never respected my per-font hinting settings in .fonts.conf which drove me totally bonkers. Apparently, what causes them to ignore the hinting settings is actually due to cairo overriding it. I found a solution on Ubuntu forums and created a patch for Cairo that will make it respect .fonts.conf: --- cairo-1.4.12/src/cairo-ft-font.c.orig 2008-06-05 19:34:45.000000000 -0500 +++ cairo-1.4.12/src/cairo-ft-font.c 2008-06-05 19:35:17.000000000 -0500 @@ -1641,7 +1641,7 @@ options->base.subpixel_order = other->base.subpixel_order; } - if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT) + //if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT) options->base.hint_style = other->base.hint_style; if (other->base.hint_style == CAIRO_HINT_STYLE_NONE)
Vasile Gaburici
2008-Aug-06 02:27 UTC
[Fontconfig] Make GTK+ apps (and Gnome) fully respect your .fonts.conf
That''s a bit odd. I had no trouble getting pango-view, which uses Cairo on Fedora 9, to render fonts as instructed in .fonts.conf... On Wed, Aug 6, 2008 at 5:24 AM, Erik <erik at beanbasket.com> wrote:> Since this has bothered me for a long time, as I imagine it would > anybody who likes to uber-tweak their .fonts.conf, I figured I would put > it out there. Gnome and GTK+ apps never respected my per-font hinting > settings in .fonts.conf which drove me totally bonkers. Apparently, > what causes them to ignore the hinting settings is actually due to cairo > overriding it. I found a solution on Ubuntu forums and created a patch > for Cairo that will make it respect .fonts.conf: > > > --- cairo-1.4.12/src/cairo-ft-font.c.orig 2008-06-05 > 19:34:45.000000000 -0500 > +++ cairo-1.4.12/src/cairo-ft-font.c 2008-06-05 19:35:17.000000000 -0500 > @@ -1641,7 +1641,7 @@ > options->base.subpixel_order = other->base.subpixel_order; > } > > - if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT) > + //if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT) > options->base.hint_style = other->base.hint_style; > > if (other->base.hint_style == CAIRO_HINT_STYLE_NONE) > _______________________________________________ > Fontconfig mailing list > Fontconfig at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/fontconfig > >
Erik
2008-Aug-06 02:39 UTC
[Fontconfig] Make GTK+ apps (and Gnome) fully respect your .fonts.conf
Well, specifically, what I had in my .fonts.conf was a default setting of BCI full hinting for all fonts. After that, I had configuration to use slight hinting for specific fonts. I found that Gnome (Cairo) apps would not respect this, for whatever reason, whereas KDE (Qt) would. Gnome apps would just do brute-force full-hinting of everything. This patch on cairo fixed the issue and things then rendered as they do in KDE. I actually was using MOZ_DISABLE_PANGO=1 before starting firefox, and now I no longer have to with the patched cairo. Perhaps I have a unique configuration in my .fonts.conf that exposed this. All I know is that it works now.
Behdad Esfahbod
2008-Aug-06 03:09 UTC
[Fontconfig] Make GTK+ apps (and Gnome) fully respect your .fonts.conf
On Tue, 2008-08-05 at 21:39 -0500, Erik wrote:> Well, specifically, what I had in my .fonts.conf was a default setting > of BCI full hinting for all fonts. After that, I had configuration to > use slight hinting for specific fonts. I found that Gnome (Cairo) apps > would not respect this, for whatever reason, whereas KDE (Qt) would. > Gnome apps would just do brute-force full-hinting of everything. This > patch on cairo fixed the issue and things then rendered as they do in > KDE. I actually was using MOZ_DISABLE_PANGO=1 before starting firefox, > and now I no longer have to with the patched cairo. > > Perhaps I have a unique configuration in my .fonts.conf that exposed > this. All I know is that it works now.I''m fairly sure that it comes down to having to remove the currently set hinting on pattern before setting your new value. -- behdad http://behdad.org/ "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." -- Benjamin Franklin, 1759