Closed Bug 541319 Opened 11 years ago Closed 10 years ago

firefox does not honour gtk/gnome settings in FF3.6 on Ubuntu/lucid since using --disable-system-cairo

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 404637

People

(Reporter: andersk, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2pre) Gecko/20100121 Ubuntu/10.04 (lucid) Namoroka/3.6pre
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2pre) Gecko/20100121 Ubuntu/10.04 (lucid) Namoroka/3.6pre

I’m using Firefox 3.6 from the ubuntu-mozilla-daily PPA on Ubuntu lucid amd64.  Today, subpixel fonts started displaying poorly in Firefox compared to every other application on the system.  They are bordered in distracting red and blue color fringes, which typically result from poor subpixel filtering.

I believe the problem is with the in-source cairo bundled by Firefox.  This is fixed for all other applications with Ubuntu’s cairo patch debian/patches/04_lcd_filter (see <https://bugs.freedesktop.org/show_bug.cgi?id=10301>).  But ubuntu-mozilla-daily recently started configuring their packages with --disable-system-cairo, leading to this regression.

Reproducible: Always




firefox 3.6~hg20100120r33527+nobinonly-0ubuntu1~umd2 from https://launchpad.net/~ubuntu-mozilla-daily/+archive/ppa, on lucid amd64 with all current updates.
Component: General → Widget: Gtk
Product: Firefox → Core
QA Contact: general → gtk
And this is not bug 458612 (that is: you tried with a ~/.fonts.conf as mentioned around bug 458612 comment 14)? See also bug 458612 comment 31 for a way to check for that issue.

If you are correct about the only relevant difference being the 04_lcd_filter patch isn't this a bug with the ubuntu-mozilla-daily ppa? That is: don't you just want them to apply that patch to mozilla's copy of cairo when building?
Most likely a dupe of bug 458612 or bug 404637...
Component: Widget: Gtk → Graphics
QA Contact: gtk → thebes
I don't think that this is caused by the lcd patch (alone).

Andres, can you check if firefox honours any of the settings you can change in the gnome fonts dialog wrt hinting, anti aliasing, subpixel rendering?
Status: UNCONFIRMED → NEW
Ever confirmed: true
The Smoothing control (None/Grayscale/Subpixel) and the Subpixel Order control (RGB/BGR/VRGB/VBGR) takes effect after a restart of Firefox (though in other applications it takes effect immediately).  The Hinting control (None/Slight/Medium/Full) does not take effect in Firefox.

AFAIK there’s no GNOME control for the LCD filter.
I am aware of bug 458612, but this isn’t the problem I’m reporting.  Ubuntu’s /etc/fonts/conf.d/11-lcd-filter-lcddefault.conf sets the right LCD filter systemwide, and changing lcdfilter in ~/.fonts.conf affects other non-GNOME applications but not Firefox.

Bug 404637 does match my symptoms.
i debugged this issue a few month ago and from my understanding it has something to do that gtk+ using system cairo for the font settings initialization and stores the config in a struct that is then not seen by firefox cairo ... but thats just out of the top of my head. I will see if i find the place where this happened again ...
I'm facing the same problem on 32 bit too: 
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2) 
Gecko/20100124 Ubuntu/10.04 (lucid) Firefox/3.6
Same problem here with Kubuntu Lucid

Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2) Gecko/20100125 Ubuntu/10.04 (lucid) Firefox/3.6
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 404637
Bug 404637 is not obviously a dupe of this one. that one is about the lcd patch; this one is also about gtk settings not being honoured at all for hinting.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Summary: Poor subpixel font rendering compared to rest of system in FF3.6 on Ubuntu → firefox does not honour gtk/gnome settings in FF3.6 on Ubuntu/lucid since using system-cairo
Summary: firefox does not honour gtk/gnome settings in FF3.6 on Ubuntu/lucid since using system-cairo → firefox does not honour gtk/gnome settings in FF3.6 on Ubuntu/lucid since using --disable-system-cairo
Is the Ubuntu patch now included in upstream Cairo? If so, this will be fixed by bug 542605
And if not, you may want to talk to the owner of that bug to discuss possible inclusion.
michael, this bug is about gtksettings for hinting style is not honoured if you use --disable-system-cairo - we dont have a patch for that in ubuntu.
asac: are you sure you don't have fontconfig rules overriding the gtk settings?
(See bug 458612.)
Karl, iirc that was fixed a while ago by a fontconfig cleanup. also iirc, it was an issue even when using system-cairo.

Also, afaict fontconfig should never win over gtk settings - and thats the behaviour you see on the rest of the desktop.
(In reply to comment #15)
> Karl, iirc that was fixed a while ago by a fontconfig cleanup. also iirc, it
> was an issue even when using system-cairo.

Excellent.  As you imply, if gtk settings are having an effect with system-cairo, they should be having an effect with tree-cairo.  This is the code that pulls in GTK Settings:

http://hg.mozilla.org/releases/mozilla-1.9.2/file/b24909ba494f/gfx/thebes/src/gfxPangoFonts.cpp#l3145

Doing "call FcPatternPrint(aPattern)" before and after cairo_ft_font_options_substitute() may be enlightening.
well. i debugged this once and saw that the gtksettings struct initialized on startup by system cairo (yes, gtk loads system cairo first), is then NULLed out when it comes to in-source cairo.

How sure are you that this works anywhere? I think i got someone confirming that gtk settings have no effect in fedora too with upstream builds. I will get that reconfirmed.
Now I build firefox trunk on fedora 12 and ubuntu 9.
Under fedora firefox follows font rendering settings, at least when build with "enable-system-cairo". 
Under ubuntu it doesn't.
(In reply to comment #14)
> asac: are you sure you don't have fontconfig rules overriding the gtk settings?

(In reply to comment #15)
> Karl, iirc that was fixed a while ago by a fontconfig cleanup. also iirc, it
> was an issue even when using system-cairo.

fontconfig-config still looks like it contains
/etc/fonts/conf.d/10-hinting-slight.conf

http://packages.ubuntu.com/karmic/all/fontconfig-config/filelist

The reporter reported the lcd filter changes with the switch from system-cairo.

asac, it was you who raised the issue of gtk settings and changed the summary of this bug, yet i don't see anyone claiming that that started with the switch from system-cairo.

> Also, afaict fontconfig should never win over gtk settings - and thats the
> behaviour you see on the rest of the desktop.

You see that behavior in cairo apps because of this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=11838

The correct behavior is to give fontconfig the option of checking the gtk settings and adjusting according to the font.  This is the behavior of Xft apps (though Qt has its own peculiarities).
Karl, what's the status of this bug?
Status: REOPENED → RESOLVED
Closed: 11 years ago10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 404637
You need to log in before you can comment on or make changes to this bug.