Last Comment Bug 660448 - Subpixel antialiasing too strong/incorrect everywhere
: Subpixel antialiasing too strong/incorrect everywhere
Status: VERIFIED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: unspecified
: x86 Linux
: -- normal with 2 votes (vote)
: mozilla7
Assigned To: Joe Drew (not getting mail)
:
: Milan Sreckovic [:milan]
Mentors:
: 663698 (view as bug list)
Depends on: 666732
Blocks: 404637 562746
  Show dependency treegraph
 
Reported: 2011-05-28 06:13 PDT by echogene.alpha
Modified: 2011-10-09 22:17 PDT (History)
16 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Comparison of antialiasing (5.98 KB, image/png)
2011-05-28 06:16 PDT, echogene.alpha
no flags Details
dlsym FT_Library_SetLcdFilter for now (2.26 KB, patch)
2011-06-09 14:09 PDT, Joe Drew (not getting mail)
no flags Details | Diff | Splinter Review
dlsym FT_Library_SetLcdFilter for now (2.93 KB, patch)
2011-06-09 14:10 PDT, Joe Drew (not getting mail)
karlt: review+
jacob.benoit.1: review+
Details | Diff | Splinter Review
Pretty! (63.40 KB, image/png)
2011-06-10 11:18 PDT, Daniel Cater
no flags Details
Fixed (74.17 KB, image/png)
2011-06-12 09:51 PDT, Daniel Cater
no flags Details

Description echogene.alpha 2011-05-28 06:13:09 PDT
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:7.0a1) Gecko/20110526 Firefox/7.0a1
Build Identifier: Mozilla/5.0 (X11; Linux i686; rv:7.0a1) Gecko/20110526 Firefox/7.0a1

Subpixel antialiasing has become too strong/wrong in the latest builds of Nightly.  That is, where it is red and blue, it is too red and too blue.  This happens on both web pages and the entire user interface (menu bar and below).

Reproducible: Always

Steps to Reproduce:
1. Open Firefox
2. Look at text

Actual Results:  
Text looks weird.  Upon zooming in, it's easy to see that subpixel antialiasing is wrong.

Expected Results:  
Text should look like it did in previous builds.
Comment 1 echogene.alpha 2011-05-28 06:16:12 PDT
Created attachment 535848 [details]
Comparison of antialiasing

A comparison of subpixel antialiasing in Nightly and Firefox 4.
Comment 2 Jonathan Kew (:jfkthame) 2011-05-28 07:51:23 PDT
That's a pretty glaring difference. Jeff, might this possibly be related to the recent cairo update (bug 562746)?
Comment 3 Timothy Nikkel (:tnikkel) 2011-05-29 00:30:05 PDT
The cairo update alone is definitely responsible for a change in text rendering on my Linux machine.
Comment 4 Ahmad Samir 2011-05-30 15:49:21 PDT
Since cairo 1.9.10, this change is in effect http://cgit.freedesktop.org/cairo/commit/?id=7a023a62f7517ad0d54f4d59c99909fadcc05e82

I think it maybe related, https://bugs.freedesktop.org/show_bug.cgi?id=34886#c3
(disclaimer: I am not an expert in cairo, freetype, fontconfig or mozilla; so don't take what I say to heart... :)).
Comment 5 Joe Drew (not getting mail) 2011-05-31 12:41:25 PDT

*** This bug has been marked as a duplicate of bug 456448 ***
Comment 6 Joe Drew (not getting mail) 2011-06-09 14:06:44 PDT
OK, I'm going to undupe this for a short-term patch. The long-term fix is bug 456448, but we're blocked on releng for that.
Comment 7 Joe Drew (not getting mail) 2011-06-09 14:09:17 PDT
Created attachment 538345 [details] [diff] [review]
dlsym FT_Library_SetLcdFilter for now

OK, let's just dlsym() FT_Library_SetLcdFilter for now. This is not a long-term fix, because on computers that don't have this symbol we'll be a rainbowy mess. (We have to stop supporting distributions with old freetypes.) But until all the infrastructural work to upgrade Freetype and stop supporting old versions of it is done, this'll do.
Comment 8 Joe Drew (not getting mail) 2011-06-09 14:10:15 PDT
Created attachment 538346 [details] [diff] [review]
dlsym FT_Library_SetLcdFilter for now

Forgot to qrefresh.
Comment 9 Karl Tomlinson (back Dec 13 :karlt) 2011-06-09 17:15:15 PDT
Comment on attachment 538346 [details] [diff] [review]
dlsym FT_Library_SetLcdFilter for now

I probably would have replaced initialized_setLcdFilter with

  static setLcdFilterFunc setLcdFilter =
      (setLcdFilterFunc) dlsym (RTLD_DEFAULT, "FT_Library_SetLcdFilter");

in the code block scope but I haven't checked the C standard to make sure that is called on first pass, and what you have does the right thing.
Comment 10 Joe Drew (not getting mail) 2011-06-09 17:28:05 PDT
That's how I started out, but it seems you can't initialize statics with a non-constant.
Comment 11 Karl Tomlinson (back Dec 13 :karlt) 2011-06-09 17:33:39 PDT
Oh, interesting, thanks.
Comment 12 Daniel Cater 2011-06-10 11:12:47 PDT
Mozilla/5.0 (X11; Linux i686; rv:7.0a1) Gecko/20110610 Firefox/7.0a1

Using a range of Unicode box-drawing characters and mathematical operators, you can upgrade to Bugzilla Color Edition™!

││││││││
││││││││
││││││││
││││││││

║║║║║║║║
║║║║║║║║
║║║║║║║║
║║║║║║║║

||||||||
||||||||
||||||||
||||||||

∣∣∣∣∣∣∣∣
∣∣∣∣∣∣∣∣
∣∣∣∣∣∣∣∣
∣∣∣∣∣∣∣∣

⊪⊪⊪⊪⊪⊪⊪⊪
⊪⊪⊪⊪⊪⊪⊪⊪
⊪⊪⊪⊪⊪⊪⊪⊪
⊪⊪⊪⊪⊪⊪⊪⊪

⟒⟒⟒⟒⟒⟒⟒⟒
⟒⟒⟒⟒⟒⟒⟒⟒
⟒⟒⟒⟒⟒⟒⟒⟒
⟒⟒⟒⟒⟒⟒⟒⟒

∐∐∐∐∐∐∐∐
∐∐∐∐∐∐∐∐
∐∐∐∐∐∐∐∐
∐∐∐∐∐∐∐∐

This comment works as a testcase for me. These are all quite distinctly coloured on my screen. It's almost likeable.
Comment 13 Daniel Cater 2011-06-10 11:18:27 PDT
Created attachment 538565 [details]
Pretty!

Note that I have my monospace font size set to 16 in Firefox as the default is too small for me. Zooming in and out changes the colours :-)
Comment 14 Joe Drew (not getting mail) 2011-06-10 18:08:45 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/76d7b28ca1ba
Comment 15 Marco Bonardo [::mak] 2011-06-11 02:29:22 PDT
http://hg.mozilla.org/mozilla-central/rev/76d7b28ca1ba
Comment 16 Jonathan Kew (:jfkthame) 2011-06-12 08:41:41 PDT
*** Bug 663698 has been marked as a duplicate of this bug. ***
Comment 17 Daniel Cater 2011-06-12 09:51:48 PDT
Created attachment 538765 [details]
Fixed

Confirming that this is fixed for me (compare with attachment 538565 [details]).

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