Closed Bug 1568841 Opened 2 months ago Closed 2 months ago

Blurry font rendering after landing patch from bug #1553818

Categories

(Core :: Graphics: Text, defect, P1, blocker)

70 Branch
All
Windows
defect

Tracking

()

VERIFIED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox68 --- unaffected
firefox69 + verified
firefox70 + verified

People

(Reporter: Virtual, Assigned: lsalzman)

References

(Regression)

Details

(5 keywords)

Attachments

(11 files)

11.06 KB, text/plain
Details
115.92 KB, image/png
Details
116.59 KB, image/png
Details
14.45 KB, text/plain
Details
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
68.79 KB, image/png
Details
62.88 KB, image/png
Details
85.51 KB, image/png
Details
82.04 KB, image/png
Details
120.20 KB, image/png
Details

STR:

  1. Open about:support or any Firefox menu
    and see that font is blurry

Could you copy-paste the graphics section og your about:support page here?

Flags: needinfo?(Virtual)

Also, finding a regression range with mozregression would be super helpful.

@ Lee Salzman [:lsalzman] - Could you please look on this issue, as your patch caused it. Thanks!

Flags: needinfo?(Virtual) → needinfo?(lsalzman)
Regressed by: 1553818
Summary: Mozilla Firefox Nightly 70.0a1 (2019-07-25) has blurry font rendering → Blurry font rendering after landing patch from bug #1553818

Regression caused by:
Bug 1553818 - use GDI ClearType contrast for GDI font gamma. r=jrmuizel

Differential Revision:
https://phabricator.services.mozilla.com/D39101

Has Regression Range: --- → yes
OS: Windows 7 → Windows
Hardware: x86_64 → Desktop
Version: 67 Branch → 70 Branch

Could you post "before" and "after" screenshots showing the regression you're seeing? There's so much variation among graphics and rendering systems that it's hard to be sure whether Lee or other developers will be seeing the same results as you.

Attached file about:support
I'm also experiencing it but it occurs on all text. The STR Virtual_ManPL listed is actually a less noticible way of reproducing than simply visiting any website (I'm using dark theme). It is much easier to notice it with black text on a white background.
I am using font scaling at 1.04x.

I'm also experiencing it but it occurs on all text. The STR Virtual_ManPL listed is actually a less noticible way of reproducing than simply visiting any website (I'm using dark theme). It is much easier to notice it with black text on a white background.
I am using font scaling at 1.04x.

The problem is enhanced contrast being applied in the GDI case. The gamma is actually now correct, it was just that the contrast artificially brightened dark text, but left light text unaffected, which is why we didn't notice this in the original bug.

Flags: needinfo?(lsalzman)
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2cc215b4d3f6
Don't use enhanced contrast on GDI fonts. r=jfkthame
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/90a13bb83261
force GDI parameters for GDI render mode. r=jrmuizel

I'm confirming that bug is fixed, starting in Mozilla Firefox Nightly 70.0a1 (2019-07-26), so I'm marking this bug as VERIFIED.
Thank you very much! \o/

Status: RESOLVED → VERIFIED

Font isn't 100% fixed for me, it seems like ClearType isn't working properly as text now looks thin and aliased. Not sure if it's due to this bug exactly though.

Could you please post screenshots before this bug and after patch with same content?

Flags: needinfo?(wot_up_dogg)

Hmm... I can't spot any difference now with the 20th build, haven't tried others but I have a feeling it may have been the latest 1903 Windows update.

Flags: needinfo?(wot_up_dogg)

Actually I can spot the differences but I can't immediately notice it anywhere but in the tab title. I'm not sure if the 20th build had correct font rendering but you can see the difference in font weight with these screenshots:

"[21]" is noticeably red and blue in comment 23, but it looks perfect in comment 24. By bug 1553818 some fonts were made thinner again to match pre-WebRender appearance.

Attached image before bug1568841.PNG

:darkspirit, I agree that the 27th build looks better when looking closely but I'm running a rather heavy ClearType: ClearType Parameters: Gamma: 2.2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 100 which imo should be making the text have a little more weight to it.
The problem I'm facing is my eyesight has problems reading the now very thin text. I'm already using 1.04x scaling and going even .01 higher causes websites to have stupidly large text.

Attached image webrenderdisabled.PNG

This is with Webrender disabled, while for some reason it doesn't seem as clear in the screenshot (is sniping tool really lossless even though it's saving as png?) it is much clearer than current WR enabled. Most notably on the 0s.

Attachment #9080609 - Attachment description: bad.png → without patch from bug #1553818.png
Attachment #9080609 - Attachment filename: bad.png → without patch from bug #1553818.png
Attachment #9080610 - Attachment description: good.png → with patch from bug #1553818.png
Attachment #9080610 - Attachment filename: good.png → with patch from bug #1553818.png
Attachment #9081122 - Attachment filename: no issue.png → with patch from bug #1553818 & bug #1568841.png
Attachment #9081122 - Attachment is patch: false

In my case:

@ Jules A - Looks like you need to tune your non-default settings.

@ Lee Salzman [:lsalzman] - Thank you very much for fixing this issue, now with default settings text looks even better than before. Per bug #1553818 comment #13, I would like to request the request for uplifting also this bug to Firefox 69.

Flags: needinfo?(lsalzman)
Attachment #9080609 - Attachment description: without patch from bug #1553818.png → with patch from bug #1553818.png
Attachment #9080609 - Attachment filename: without patch from bug #1553818.png → with patch from bug #1553818.png
Attachment #9080610 - Attachment description: with patch from bug #1553818.png → without patch from bug #1553818.png
Attachment #9080610 - Attachment filename: with patch from bug #1553818.png → without patch from bug #1553818.png

@Virtual_ManPL I don't think you understand my issue though to be fair I think my main issue is actually moreso to do with bug #1553818 than this bug. Changing Cleartype will make every other app that uses it look like garbage so that's not an option (currently Edge has the best font rendering by default (since WR is by default enabled). Clearing font.size.systemFontScale means I would need to increase the whole app scaling which breaks themes and other UI elements while adding blurriness to the whole browser.
It's not that text isn't sharp now, it's just that it's too sharp that aliasing is a problem.
Why is it that WR disabled is able to respect these necessary changes of mine but it no longer does with WR enabled?
Oh and I'm using a 27" 1440p monitor, in-case you were wondering.

@ Jules A - Oh, I'm sorry, you're using mainly WebRender compositing. In my case I'm using Direct3D 11 (Advanced Layers) compositing, as I'm on Windows 7 and WebRender is disabled on it by default as I'm seeing in about:support, so no wonder I didn't understand you completely. I was thinking that it's mainly because of modified and changed default ClearType options either in system or browser. I could only recommend for you creating new bug about this and attach identical whole screenshots (like mine here) to easy spot differences between them. CC or needinfo me there, and I would help, if you will need it.

Comment on attachment 9080648 [details]
Bug 1568841 - Don't use enhanced contrast on GDI fonts. r?jfkthame

Beta/Release Uplift Approval Request

  • User impact if declined: Windows users will see GDI fonts with incorrect contrast if using WebRender or Skia.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky):
  • String changes made/needed:
Flags: needinfo?(lsalzman)
Attachment #9080648 - Flags: approval-mozilla-beta?
Attachment #9080960 - Flags: approval-mozilla-beta?

Comment on attachment 9080648 [details]
Bug 1568841 - Don't use enhanced contrast on GDI fonts. r?jfkthame

Follow-up fix for bug 1563818 to further improve Windows font rendering for users with WebRender enabled. Approved for 69.0b9.

Attachment #9080648 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9080960 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Thanks for verification Virtual_ManPL.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.