FS#15343 - [firefox] 3.5 doesn't respect system-wide anti-aliasing settings

Attached to Project: Arch Linux
Opened by Radu Potop (wooptoo) - Thursday, 02 July 2009, 12:07 GMT
Last edited by Aaron Griffin (phrakture) - Monday, 18 January 2010, 23:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:

I have anti-aliasing turned off for fonts under 12px.
Firefox 3.0 did respect these settings, but after upgrading to Firefox 3.5 all fonts are anti-aliased, even those smaller than 12px.
This task depends upon

Closed by  Aaron Griffin (phrakture)
Monday, 18 January 2010, 23:27 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments. Firefox is stupid
Comment by Paul Bredbury (brebs) - Sunday, 05 July 2009, 17:23 GMT
Sounds like firefox should be recompiled to use the *system* cairo:
http://bbs.archlinux.org/viewtopic.php?id=40990

ac_add_options --enable-system-cairo
Comment by Jan de Groot (JGC) - Sunday, 05 July 2009, 17:29 GMT
This option is in the mozconfig file for both xulrunner and firefox, so your statement doesn't make sense.
Comment by Thayer Williams (thayer) - Sunday, 05 July 2009, 20:09 GMT
Yeah I think this may be an upstream bug. I've included screenshots and relative info in this thread:
http://bbs.archlinux.org/viewtopic.php?pid=579688#p579688

It appears that FF 3.5 is forcing hinting (but not anti-aliasing as suggested above), regardless of fontconfig or ~/.fonts.conf settings. My ~/.fonts.conf is attached. I've also tried forcing off hinting in /etc/fonts/conf.d with no success.
Comment by Jan de Groot (JGC) - Sunday, 05 July 2009, 20:27 GMT
When I tell GNOME not to do any antialiasing (monochrome option), refreshing the page in firefox shows jagged characters, so firefox appears to respond to settings.
Comment by Giorgio (uastasi) - Sunday, 05 July 2009, 20:28 GMT
Same problem here with fontconfig-lcd and cairo-lcd packages.
Comment by Thayer Williams (thayer) - Sunday, 05 July 2009, 20:52 GMT
Jan, do the jagged characters more closely resemble my 3.0 screenshot or the 3.5 screenshot (see thread link above)?

In my experience antialiasing can be toggled, but hinting cannot and when that's the case the fonts are practically illegible. I'm not using gnome-settings-daemon however, just a simple ~/.fonts.conf. And FWIW I'm using all vanilla cairo/freetype/fontconfig packages--none that tweaked stuff.
Comment by Jan de Groot (JGC) - Sunday, 05 July 2009, 21:05 GMT
I don't think this is a firefox bug, but rather a pango bug. Playing with the hinting settings in GNOME shows this:
None: fat characters, very ugly
Slight: a bit more fat characters, even more ugly
Medium: looks good and sharp
Full: looks good and sharp also

Or someone tell me that this is desired behaviour for hinting :P
Comment by Paul Bredbury (brebs) - Monday, 06 July 2009, 02:06 GMT
You probably want cairo-respect-fontconfig.patch:

--- cairo-1.7.6-orig/src/cairo-ft-font.c 2008-09-29 21:43:13.000000000 +0100
+++ cairo-1.7.6/src/cairo-ft-font.c 2008-09-29 21:52:19.000000000 +0100
@@ -1705,7 +1705,9 @@
options->base.subpixel_order = other->base.subpixel_order;
}

- if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT)
+ options->base.hint_style = CAIRO_HINT_STYLE_DEFAULT;
+
+ if (other->base.hint_style != CAIRO_HINT_STYLE_DEFAULT)
options->base.hint_style = other->base.hint_style;

if (other->base.hint_style == CAIRO_HINT_STYLE_NONE)

Info threads to wade through:
http://www.fedoraforum.org/forum/showthread.php?t=186789&page=4
http://forums.gentoo.org/viewtopic-t-511382-postdays-0-postorder-asc-start-700.html
Comment by Thayer Williams (thayer) - Monday, 06 July 2009, 02:36 GMT
Thanks for the suggestion, Brebs but unfortunately that didn't do the trick either.
Comment by Paul Bredbury (brebs) - Monday, 06 July 2009, 05:52 GMT
Set up fontconfig - create ~/.fonts.conf (yes, that's a DOT at the start)
Here's mine: http://pastebin.com/f3f219efb
This solution is also at http://ubuntuforums.org/showthread.php?t=1200992
Comment by Thayer Williams (thayer) - Monday, 06 July 2009, 13:48 GMT
The Ubuntu solution only works however if the user prefers antialiased fonts. Disabling antialiasing doesn't work.
Comment by Paul Bredbury (brebs) - Monday, 06 July 2009, 18:04 GMT
Disabling antialiasing doesn't work? What's the problem with this:
http://pastebin.com/f6eb48a09

Looks like antialiasing is disabled, to me. If you still think there's a problem, post your complete ~/.fonts.conf, and enable cairo-respect-fontconfig.patch ( http://pastebin.com/f6b495b17 ) in the cairo package.
Comment by Thayer Williams (thayer) - Wednesday, 15 July 2009, 15:10 GMT
I was able to resolve my issues by setting the following in ~/.fonts.conf:

* antialiasing OFF
* autohint OFF
* hinting ON
* hintstyle HINTFULL

This, for some reason, now produces the Windows 98/XP style font rendering I've been trying to restore.
Comment by Marco Rocco (ech0s7) - Friday, 07 August 2009, 07:11 GMT
i have fixed in this way: changing hintstyle from "hintfull" to "hintslight" in ~/.fonts.conf. But now why firefox 3.5 doesn't works with hintfull ? I would hintfull for my system...
Comment by Radu Potop (wooptoo) - Sunday, 17 January 2010, 19:20 GMT
I found the fix. Add this to /etc/fonts/local.conf or to ~/.fonts.conf

<!-- Firefox fix (it uses pixelsize, instead of size) -->
<match target="font">
<test compare="less_eq" name="pixelsize" qual="any">
<int>16</int>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>

Firefox is stupid.

Loading...