Closed Bug 1298484 Opened 4 years ago Closed 4 years ago
Firefox is running in Clear Type mode by default
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:51.0) Gecko/20100101 Firefox/51.0 Build ID: 20160826101718 Steps to reproduce: In XP Firefox is running with clear type enabled by default. This despite the fact clear type is not enabled in Windows XP display settings. The result is blurry text on toolbars and websites. Tested with a new profile and no addons.
A temporary workaround to this bug is to remove Skia from "gfx.content.azure.backends". With that change clear type is disabled again.
QA Whiteboard: [bugday-20160829]
Component: Untriaged → Graphics: Text
Product: Firefox → Core
Hi Marty, Can you please try this build to see if it fixes the issue for you? https://firstname.lastname@example.org/try-win32/firefox-51.0a1.en-US.win32.installer.exe Thanks!
Hello, no that build didn't change anything, it's still displaying Cleartype in both XP and Windows 7 with HWA disabled and skia added back to "gfx.content.azure.backends". In comparison to 45esr side by side to the nightly if Cleartype is enabled in Display properties\Effects in XP both the nightly and 45 look exactly the same on the toolbars and website text. When Clearytype is disabled again then it's also disabled in 45 but not in the nightly unless skia is removed.
4 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
4 years ago
Can you please try this one? It mostly looks the same for me on Windows 7. I don't have a Windows XP machine to test though :(. Thanks! https://email@example.com/try-win32/firefox-51.0a1.en-US.win32.installer.exe
4 years ago
Today's test build appears to fix it on the toolbars in XP and Windows 7 (they're both affected with HWA disabled) but website text is still in cleartype. Here are screenshots of 45esr and the nightly taken in Windows 7. You might want to download them to your desktop for a better comparison: 45esr: https://postimg.org/image/h39xjiaod/ nightly: https://postimg.org/image/vi9ly78j9/
So it looks like the text on the sidebar on the right is the same but the other font on the left is not. Is that the case?
The whole page is cleartype, every one looks exactly as it does when cleartype is turned on through the OS, either in XP or Windows 7.
Can you attach your about:support here please?
Here's the data from about:support as requested.
Testing it today in XP it's not cleartype, there is a difference if that's enabled but in comparison to if skia is removed, which returns it completely to the prior state or to 45esr the text is larger and bolder on some pages and not on others. As long as skia can be removed and is not hard-coded then it's not so much of an issue although one would lose whatever benefit skia brings. For me, how the text looks and reads on the page is more important.
To clarify the previous post: at least on my system yesterday's test build from comment 4 resolves this bug as it is no longer running in cleartype with skia enabled.
(In reply to Marty from comment #11) > To clarify the previous post: at least on my system yesterday's test build > from comment 4 resolves this bug as it is no longer running in cleartype > with skia enabled. So does that mean comment 5 is invalid and the builds from comment 4 fix the issue for you (per comment 10)?
(In reply to Mason Chang [:mchang] from comment #12) > (In reply to Marty from comment #11) > > To clarify the previous post: at least on my system yesterday's test build > > from comment 4 resolves this bug as it is no longer running in cleartype > > with skia enabled. > > So does that mean comment 5 is invalid and the builds from comment 4 fix the > issue for you (per comment 10)? For XP yes, in that OS it is back to pre-skia with skia enabled. In Windows 7, which the comparison screenshots above can show it's not cleartype either but the text, particularly titles on web pages are larger and bolder. You would know if that's related to skia itself but in terms of this bug it's not running in cleartype mode anymore in either OS, at least for me. Can't say about any other OSs.
Cairo and D2D were respecting system wide cleartype settings and disabling subpixel AA when cleartype was disabled. Let's do the same for Skia. Unfortunately we have to check everytime we render text since cleartype can be dynamically disabled.
Comment on attachment 8787338 [details] [diff] [review] Properly set Skia AA if cleartype is disabled system wide Might actually want to do something different here with regard to hinting and cleartype.
(In reply to Mason Chang [:mchang] from comment #15) > Comment on attachment 8787338 [details] [diff] [review] > Properly set Skia AA if cleartype is disabled system wide > > Might actually want to do something different here with regard to hinting > and cleartype. r+ but with one nit... Nit: Since GetDefaultAAMode() can be expensive to call because it may be doing system calls, maybe do like: AntialiasMode defaultAA = aFont->GetDefaultAAMode(); AntialiasMode aaMode = defaultAA; ... That way you have defaultAA around already rather than needing to call that again to get it down in the GDI case. Also gets rid of the need to brace that case as well. Reduce, reuse, recycle. ;)
At least with Segoe UI and cleartype disabled, there are a couple of interesting observations. Compared to Segoe UI at size 14 pt in notepad, only cairo actually looks like notepad. Chrome, Firefox w/D2D1.1, and IE all are slightly thinner than what we see in notepad. Skia in Firefox looks thicker than notepad. I think what Chrome is doing, is rendering the font as cleartype then converting it back to grayscale when cleartype is disabled. If we do this in Firefox, we look like Chrome, which also looks like IE on Windows 7. Cairo with cleartype disabled actually looks overly thin compared to IE / Chrome. I think the question then is, with cleartype disabled, do we want to be the outlier or should we make skia look like chrome / IE? Right now, Cairo and D2D look different depending on the font / website. Some fonts are bigger, some are smaller already, so they aren't already equal. If we go the route of rendering in cleartype then converting to grayscale, we look more in line with d2d than we do with cairo, albeit still different than Chrome /IE. With this, we also look more like IE / Chrome. As for why the difference between cairo and skia on this font, I'm still not really sure. Doing anything other than normal hinting makes skia render the glyph as a path. Changing the quality parameter in the logfont doesn't seem to do anything either. If we don't have a strong reason, I think the proper route here is to make Skia w/o cleartype look like IE / Chrome, which looks better than our currently overly thin fonts.
(In reply to Mason Chang [:mchang] from comment #17) > If we don't have a strong reason, I think the proper route here is to make > Skia w/o cleartype look like IE / Chrome, which looks better than our > currently overly thin fonts. That "overly thin" or sharp look used to be the standard on Windows. I think it's pretty much what users disabling ClearType expect. Why would anyone disable ClearType in order to get grayscale AA?
(In reply to Dão Gottwald [:dao] from comment #18) > (In reply to Mason Chang [:mchang] from comment #17) > > If we don't have a strong reason, I think the proper route here is to make > > Skia w/o cleartype look like IE / Chrome, which looks better than our > > currently overly thin fonts. > > That "overly thin" or sharp look used to be the standard on Windows. I think > it's pretty much what users disabling ClearType expect. Why would anyone > disable ClearType in order to get grayscale AA? Disabling cleartype actually gives you grayscale AA instead of subpixel AA. That's the only reason to disable cleartype.   https://en.wikipedia.org/wiki/ClearType
It's been a few years since I toyed with cleartype... that was on Windows XP and I'm 99% sure not using cleartype (the default on XP) disabled all AA. Apparently this bug was also filed for XP. I suppose DirectWrite behaves differently than GDI?
(In reply to Dão Gottwald [:dao] from comment #20) > It's been a few years since I toyed with cleartype... that was on Windows XP > and I'm 99% sure not using cleartype (the default on XP) disabled all AA. > Apparently this bug was also filed for XP. > > I suppose DirectWrite behaves differently than GDI? Could be something unique to Windows XP. On Windows 7, all system wide fonts in all applications have grayscale AA.
This patch always renders the font as cleartype then converts it to grayscale AA, which makes Firefox on Windows 7 look ~= IE and Chrome. Now we also don't have to check the default AA in the GDI case also! Also, cairo selectively applies grayscale AA with cleartype off. So sometimes its on, sometimes its off. This could be a GDI / Dwrite thing as at least system wide, every other application applies grayscale AA.
One question regarding the patch in Comment 22: will the option to remove skia remain because I prefer the Cairo fonts? They look exactly on Windows 7 as XP and are very readable and friendly to the eyes. IE11 not so much.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/88222d0a9266 Use cleartype and convert to grayscale AA for skia windows fonts if cleartype is disabled system wide. r=lsalzman
(In reply to Marty from comment #23) > One question regarding the patch in Comment 22: will the option to remove > skia remain because I prefer the Cairo fonts? They look exactly on Windows 7 > as XP and are very readable and friendly to the eyes. IE11 not so much. It will for a while but not in the long term. I might add a pref to disable all anti aliasing to help you, but it will still look slightly different than cairo fonts. Just for confirmation though, are the fonts different system wide versus what we have in Firefox for you in both Windows XP and 7? I've only been able to test with Windows 7. Thanks!
In XP Firefox and IE8 look very similar with cleartype disabled and I can't tell the difference system wide unless cleartype is enabled. The main problem for me with that is the blurriness. With IE11 it's grayscale with DirectWrite correct? That too is blurry and difficult to read at times. You will find countless numbers of people with the same complaints. Firefox still provides an alternative to disable all that and return to the standard font view. So it would help very much to include the added pref, it would alleviate a lot of potential problems, even if it's a bit different from cairo.
when this patch landed Talos showed an improvement: == Change summary for alert #2962 (as of September 02 2016 15:30 UTC) == Improvements: 3% tp5o Private Bytes windowsxp opt 212120228.54 -> 205265250.74 3% tp5o Private Bytes windowsxp pgo 210062013.79 -> 203642563.05 3% tp5o Main_RSS windowsxp opt 230403775.13 -> 223720605.02 3% tp5o Main_RSS windowsxp pgo 227249695.56 -> 221198154.63 For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=2962
Marty, how are your fonts looking with this patch now? Thanks!
(In reply to Mason Chang [:mchang] from comment #30) > Marty, how are your fonts looking with this patch now? Thanks! It's a little blurry for me but not nearly as bad as IE11. After experimenting with fonts I found that changing Sarif to Book Antiqua works good. But I do still hope the option is added to disable AA altogether.
I've managed to reproduce this issue on an old Nightly build from 2016.08.26. I can confirm the fix using 51 beta 10 (20161222080852) under Windows XP, SP3. The texts on websites and toolbars looks good to me. Marking here accordingly.
You need to log in before you can comment on or make changes to this bug.