Last Comment Bug 404637 - Excessive color fringing in default builds vs. --enable-system-cairo builds on Ubuntu
: Excessive color fringing in default builds vs. --enable-system-cairo builds o...
Status: RESOLVED FIXED
[fixed in Bug 562746 and Bug 660448]
: regression
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Linux
: -- normal with 10 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
: 375591 436760 541319 581715 590864 (view as bug list)
Depends on: 456448 562746 660448
Blocks: 400265
  Show dependency treegraph
 
Reported: 2007-11-20 14:42 PST by Jeffrey Baker
Modified: 2011-10-11 05:23 PDT (History)
37 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Screenshot (11.58 KB, image/png)
2007-11-20 14:42 PST, Jeffrey Baker
no flags Details
Screenshot of native text (6.44 KB, image/png)
2007-11-20 15:53 PST, Jeffrey Baker
no flags Details

Description Jeffrey Baker 2007-11-20 14:42:44 PST
Created attachment 289559 [details]
Screenshot

Firefox 3.0 does something differently with on-screen type.  This leads to excessive color fringing in some cases.  Please see the attached screenshot (which may not make any sense if you don't use an LCD screen).  The upper text is from Firefox 2.0 and the lower is from 3.0b1
Comment 1 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2007-11-20 15:46:12 PST
Is it different from other GTK/Pango apps on your system?
Comment 2 Jeffrey Baker 2007-11-20 15:53:07 PST
Created attachment 289572 [details]
Screenshot of native text

Screenshot is the same sentence typed into gedit with the same font, Droid Sans 12.
Comment 3 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2007-11-20 18:10:28 PST
Ok, I'm not really sure what's going on here. Michael might be able to help out next week.
Comment 4 Sylvain Pasche 2007-11-23 14:25:25 PST
This may be related to the cairo version. I could see differences in rendering between cairo 1.4 (native GTK apps) and the more recent Firefox cairo. See bug 375591 comment 6
Comment 5 Dylan Grose 2008-03-10 16:41:47 PDT
Yes, I can confirm this behaviour as well on Ubuntu Gutsy and Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4pre) Gecko/2008022304 Minefield/3.0b4pre. The problem is exactly as described by the bug creator.
Comment 6 m 2008-03-26 08:21:15 PDT
I can confirm the same problem on Fedora 9 and Manfield 3.0 beta 4.
Comment 7 Sylvain Pasche 2008-03-26 08:41:54 PDT
*** Bug 375591 has been marked as a duplicate of this bug. ***
Comment 8 Sylvain Pasche 2008-03-26 08:49:54 PDT
This is clearly a cairo issue. See:

https://bugs.freedesktop.org/show_bug.cgi?id=10301

Things are actually stalled upstream unfortunately. Ubuntu/Debian users are lucky because their cairo is patched against this bug.
Comment 9 Sylvain Pasche 2008-06-01 06:33:29 PDT
*** Bug 436760 has been marked as a duplicate of this bug. ***
Comment 10 Karl Tomlinson (:karlt) 2008-12-07 12:03:28 PST
Changing summary to reflect the current manifestation of this bug.
Comment 11 Jürgen 'JiHa' Harter 2009-06-11 11:37:23 PDT
Trying to build SeaMonkey on a ubuntu 9.04 machine. It builds fine when --enable-system-cairo is not set. When setted it does not build.

What cairo libs are needed?
Comment 12 Sylvain Pasche 2009-06-11 16:53:47 PDT
Look for the CAIRO_VERSION variable in the configure.in file at the top of the source tree. For mozilla-central, that's Cairo 1.6 (http://mxr.mozilla.org/mozilla-central/source/configure.in#122).

If you have building issues, I suggest you comment in the mozilla.dev.builds newsgroup (http://groups.google.com/group/mozilla.dev.builds/topics for the Web interface). You should also provide the complete error message there.
Comment 13 Ledrug 2009-12-01 12:29:25 PST
I was going to submit for a new bug, but this is exactly the same thing here.  Xft and Cairo color fringing has been a long standing problem, and David Turner (you know, Mr. Freetype) wrote a patch addressing it loooong time ago.  Somehow the Freedesktop.org people just wouldn't accept it, then again they don't always make the best decisions when it comes to font rendering.  However, since Mozilla by default uses embedded libcairo, I really don't see any reason the patch can't be applied when building.  Turner patches can be found on his site at freetype:

http://david.freetype.org/lcd/

which will not work for current versions of Cairo now, but there's the ubuntu patch derived from it:

http://archive.ubuntu.com/ubuntu/pool/main/c/cairo/cairo_1.8.6-1ubuntu2.diff.gz

I also have my own version adapted from Turner's original patch that applies cleanly against cairo 1.8.* -- which is the sole reason I build Firefox from source on my laptop.  It would be great if Mozilla can just apply this patch when building release binaries, as it would save a lot of eyesore for users.
Comment 14 Behdad Esfahbod 2009-12-01 14:16:42 PST
Ubuntu patches cairo and fontconfig to use the newer FreeType subpixel filters, whereas upstream cairo doesn't (yet).  The whole thing is very controversial since those filters are suspected to infringe patents in the US...

So, that's where the discrepancy comes from...
Comment 15 Ken 2009-12-03 14:03:12 PST
Please see  Bug 512136 (https://bugzilla.mozilla.org/show_bug.cgi?id=512136)
for windows possible related bug, with a test for windows vista/7 with cleartype https://bug363861.bugzilla.mozilla.org/attachment.cgi?id=321706
Comment 16 Sylvain Pasche 2009-12-03 14:35:40 PST
(In reply to comment #15)
> Please see  Bug 512136 (https://bugzilla.mozilla.org/show_bug.cgi?id=512136)
> for windows possible related bug, with a test for windows vista/7 with
> cleartype https://bug363861.bugzilla.mozilla.org/attachment.cgi?id=321706

That's bug 363861, which isn't related to this one.
Comment 17 Ledrug 2009-12-04 10:43:11 PST
> ... The whole thing is very controversial
> since those filters are suspected to infringe patents in the US...

But the specific patch mentioned doesn't directly do anything about glyphs.  It only enables lcdfilter options if it's _already compiled_ into the system's FreeType libs; that is, any patent issue would lie not in cairo, but in the freetype binaries because the distribution or the user chose to enable patented features, so it shouldn't be a problem for Mozilla source to include that patch.  Am I misunderstanding the situation here?
Comment 18 Behdad Esfahbod 2009-12-04 11:43:42 PST
Can you require a freetype new enough to have that API? (I think they were introduced in 2.3.0).  Or doing dlopen tricks again?
Comment 19 Ledrug 2009-12-04 12:02:50 PST
> Can you require a freetype new enough to have that API? (I think they were
> introduced in 2.3.0).  Or doing dlopen tricks again?

Turner's first lcd patch was for cairo-1.0.4, which was what, 3 years ago? The patch I use was originally for cairo-1.2.4, also ancient.  I'd think the lib version is a non-issue here.
Comment 20 Behdad Esfahbod 2009-12-04 12:26:36 PST
However, I think it is, if the base system is still RHEL5.
Comment 21 Ledrug 2009-12-04 13:09:02 PST
RHEL5 itself has Cairo > 1.2.4 already, why would it be a problem?
Comment 22 Behdad Esfahbod 2009-12-04 13:34:21 PST
I'm talking about FreeType version.  Cairo doesn't matter since Mozilla ships its own cairo.
Comment 23 Ledrug 2009-12-04 14:00:23 PST
I meant to say, if the cairo version is recent enough, freetype is probably ok--which was not true.  I compiled freetype-2.2.1 (that's what RHEL5 has I think), and patched cairo fails when linking against it.  Bummer.
Comment 24 Micah Gersten 2010-01-29 07:39:12 PST
*** Bug 541319 has been marked as a duplicate of this bug. ***
Comment 25 Karl Tomlinson (:karlt) 2010-07-26 16:12:54 PDT
*** Bug 581715 has been marked as a duplicate of this bug. ***
Comment 26 Karl Tomlinson (:karlt) 2010-09-03 01:25:59 PDT
*** Bug 590864 has been marked as a duplicate of this bug. ***
Comment 27 Karl Tomlinson (:karlt) 2011-10-09 22:09:17 PDT
*** Bug 541319 has been marked as a duplicate of this bug. ***
Comment 28 Karl Tomlinson (:karlt) 2011-10-09 22:17:05 PDT
I think this should be fixed now, as of Bug 660448 landing, though most of the fix was in Bug 562746.

Note You need to log in before you can comment on or make changes to this bug.