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.
Created attachment 535848 [details] Comparison of antialiasing A comparison of subpixel antialiasing in Nightly and Firefox 4.
That's a pretty glaring difference. Jeff, might this possibly be related to the recent cairo update (bug 562746)?
The cairo update alone is definitely responsible for a change in text rendering on my Linux machine.
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... :)).
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.
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.
Created attachment 538346 [details] [diff] [review] dlsym FT_Library_SetLcdFilter for now Forgot to qrefresh.
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.
That's how I started out, but it seems you can't initialize statics with a non-constant.
Oh, interesting, thanks.
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.
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 :-)
Created attachment 538765 [details] Fixed Confirming that this is fixed for me (compare with attachment 538565 [details]).