New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 706792 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Poor anti-aliasing of webfonts since 59.0.3056.0 update

Reported by swashand...@gmail.com, Mar 30 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3056.0 Safari/537.36

Example URL:
http://www.lovemydress.net/style-file/halfpenny-london

Steps to reproduce the problem:
1. Visit link above (for example - just happens to be the one I work on) in 59.0.3056.0 on Windows 10
2. Check italic serif uppercase heading ("Halfpenny London" on this page)

What is the expected behavior?
Font should be smooth edged and anti-aliased

What went wrong?
Visible and obvious jaggies and non-anti-aliased text. See attached image - screen on the right is Chrome 58.0.3029.41 beta, which displays as expected. Screen on left is latest Canary update.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes Previous

Does this work in other browsers? Yes

Chrome version: 59.0.3056.0  Channel: canary
OS Version: 10.0
Flash Version:
 
font-issues.PNG
37.5 KB View Download
Components: -Blink Blink>WebFonts
Cc: sureshkumari@chromium.org
Labels: -Type-Bug -Pri-2 hasbisect-per-revision ReleaseBlock-Stable M-59 Pri-1 Type-Bug-Regression
Owner: drott@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on Windows-7 and Windows-10 using Chrome canary 59.0.3056.0.
Narrow Bisect::
===============
Good::59.0.3053.0- --   (build revision 459685)
Bad ::59.0.3054.0 ---   (build revision 459950)

After executing the per-revision bisect script , got the following CL's between good and bad build versions
=============================================== 
https://chromium.googlesource.com/chromium/src/+log/dd547f46cfb46ea92f554aa842d06bde19ceef6e..5fd631a31c688954834fc1e297a67b4b1a4f08bc

Possible suspect:
----------------
https://chromium.googlesource.com/chromium/src/+/5fd631a31c688954834fc1e297a67b4b1a4f08bc

drott@ could you please look into this issue if it is related to your change,else please help us in finding the appropriate owner for this issue.

Note:Issue not seen on Mac-10.12.3 and Linux ubuntu-14.04

Thanks,

Comment 3 by drott@chromium.org, Mar 31 2017

Cc: bunge...@chromium.org
Thanks for the report. Yes, I believe we should definitely activate symmetric rendering mode for larger font sizes.

Comment 4 by drott@chromium.org, Apr 3 2017

Labels: -ReleaseBlock-Stable ReleaseBlock-Beta

Comment 5 by ajha@chromium.org, Apr 6 2017

Friendly ping to get an update on this as we approach M-59 branch date next week.

Comment 6 by drott@chromium.org, Apr 6 2017

Cc: -bunge...@chromium.org drott@chromium.org
Owner: bunge...@chromium.org
Ben, can I assign this to you?

Comment 7 by ajha@chromium.org, Apr 11 2017

Gentle ping to get an update. M-59 will be branched in 2 days time. Would it be possible to get this fixed before branch point?

Comment 8 by drott@chromium.org, Apr 11 2017

Ben is working on a fix https://skia-review.googlesource.com/c/11400/  currently blocked on issues with serialization issues in Skia, according to what I heard from him yesterday. 

Comment 9 by drott@chromium.org, Apr 11 2017

See also skia:6432, which is marked as "Started", addressed by the same CL.

Comment 10 by ajha@chromium.org, Apr 13 2017

bungeman@: Any update on this?
I figured out what the issue is, the change should be landing today.
Project Member

Comment 12 by bugdroid1@chromium.org, Apr 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9940950d3b60fec596ec8e9a6586a26c97861d96

commit 9940950d3b60fec596ec8e9a6586a26c97861d96
Author: bungeman <bungeman@chromium.org>
Date: Thu Apr 13 18:18:26 2017

Mark layout test for Skia change.

An anticipated Skia change will affect the rendering of the
fast/text/ellipsis-platform-font-change.html layout test. This is an
expected change, and will be rebaselined after the Skia change lands in
Chromium.

BUG= 706792 

Review-Url: https://codereview.chromium.org/2820563002
Cr-Commit-Position: refs/heads/master@{#464472}

[modify] https://crrev.com/9940950d3b60fec596ec8e9a6586a26c97861d96/third_party/WebKit/LayoutTests/TestExpectations

So the Skia change (which should land soon-ishly) does fix the original report, and generally makes things look the way they should.

However, there appear to be some fonts like fontawesome-webfont.woff which have a 'gasp' table like '0xFFFF GASP_DOGRAY' (no grid-fitting). This will preclude it from symmetric rendering (at any size) since it doesn't 'allow' symmetric. I'm pretty sure this wasn't the original intention. I haven't really checked but it doesn't look like it's hinted, maybe unhinted fonts when no-gridfit anti-alias should also be rendered symmetric.
Still very jaggy in 59.0.3067.6
59.0.3071.0 canary is the same, too.
Project Member

Comment 15 by bugdroid1@chromium.org, Apr 14 2017

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/9f591347e902aa0c59a5da2915d829ae162831f4

commit 9f591347e902aa0c59a5da2915d829ae162831f4
Author: Ben Wagner <bungeman@google.com>
Date: Fri Apr 14 18:50:08 2017

Symmetric rendering when >20px with DirectWrite.

If the font has a gasp table use it to determine symmetric. Otherwise,
use symmetric if the the font isn't hinted or is >20px. The remaining
cases use non-symmetric.

BUG= chromium:706792 , skia:6432 

Change-Id: I91b66a9615aae27c195e1545298a9d36bc58a705
Reviewed-on: https://skia-review.googlesource.com/11400
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

[modify] https://crrev.com/9f591347e902aa0c59a5da2915d829ae162831f4/src/ports/SkScalerContext_win_dw.cpp

Project Member

Comment 16 by bugdroid1@chromium.org, Apr 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c878a9ffb8f179cd7ab5f8e054d96e399d28d514

commit c878a9ffb8f179cd7ab5f8e054d96e399d28d514
Author: skia-deps-roller@chromium.org <skia-deps-roller@chromium.org>
Date: Fri Apr 14 23:40:38 2017

Roll src/third_party/skia/ dc83b892a..b712089b9 (10 commits)

https://skia.googlesource.com/skia.git/+log/dc83b892a0ae..b712089b93fa

$ git log dc83b892a..b712089b9 --date=short --no-merges --format='%ad %ae %s'
2017-04-14 reed remove lock tracking in bitmaps -- they are always locked
2017-04-14 msarett getDeferredTextureImageData(): use legacy scaling in legacy mode
2017-04-14 herb Remove dangerous constructor from SkArenaAlloc
2017-04-14 caryclark fix scan converter arena alloc
2017-04-14 mtklein skirt std::chrono on MSAN builds
2017-04-13 bungeman Symmetric rendering when >20px with DirectWrite.
2017-04-14 bungeman Fix advances for aliased text with DirectWrite.
2017-04-14 robertphillips Revert "Reduce read/write-SurfacePixels call sites"
2017-04-14 robertphillips Reduce read/write-SurfacePixels call sites
2017-04-14 kjlubick Add jobs for Samsung Chromebook XE303C12

Created with:
  roll-dep src/third_party/skia
BUG= 706792 


Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
TBR=mtklein@chromium.org

Change-Id: I36c273938ec58a2574c2879a2fd6691373c9234f
Reviewed-on: https://chromium-review.googlesource.com/478552
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#464828}
[modify] https://crrev.com/c878a9ffb8f179cd7ab5f8e054d96e399d28d514/DEPS

Cc: kavvaru@chromium.org
 Issue 711043  has been merged into this issue.

Comment 18 by ajha@chromium.org, Apr 17 2017

Labels: TE-Verified-60.0.3073.0 TE-Verified-M60
This seems to be working fine on the latest canary(60.0.3073.0) on Windows-10. Attached is the screenshot of the same. Adding the verified label.
706792.png
17.9 KB View Download
Just following the thread... As the person who reported the issue, I can confirm that the lead font (as served from Adobe / Typekit) is now rendering as expected on 60.0.3073.0 canary (Win 10).

The FontAwesome icon font however is still jagged compared to Chrome 58.0.3029.68 beta (as can be seen in the screenshot from previous commenter).

Props to the team though for getting on the case.
Labels: Merge-Request-59
This is a request to merge Skia change https://skia.googlesource.com/skia/+/9f591347e902aa0c59a5da2915d829ae162831f4 into Skia branch https://skia.googlesource.com/skia/+/chrome/m59 . This change was intended for, but just missed, M59.
Project Member

Comment 21 by sheriffbot@chromium.org, Apr 17 2017

Labels: -Merge-Request-59 Merge-Review-59 Hotlist-Merge-Review
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 22 by bugdroid1@chromium.org, Apr 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b23e35c8ae0fcc9597eaf908bbcc9c9d5fb382de

commit b23e35c8ae0fcc9597eaf908bbcc9c9d5fb382de
Author: bungeman <bungeman@chromium.org>
Date: Mon Apr 17 15:42:42 2017

Rebaseline for 706792

The Skia change has landed, so mark the one suppressed layout test as
[ NeedsRebaseline ].

BUG= chromium:706792 

Review-Url: https://codereview.chromium.org/2819223002
Cr-Commit-Position: refs/heads/master@{#464924}

[modify] https://crrev.com/b23e35c8ae0fcc9597eaf908bbcc9c9d5fb382de/third_party/WebKit/LayoutTests/TestExpectations

Thanks for the fix - just need to confirm a few things before accepting merge. Has this been tested in Canary? Is there enough unit testing coverage? Is this a safe merge?
My canary, 60.0.3074.0 canary, still has a number of jaggy fonts - like the purple item titles on a google search result page, for instance.

Comment 26 by drott@chromium.org, Apr 19 2017

http://roettsch.es/asymmetric_mode/ and http://roettsch.es/arialgmail.html definitely are improved with this change, I tested this in 3074 Canary. I consider it safe to merge and the right change to avoid a regression in the M59 beta. 

Re #59, on which OS version? Can you send a screenshot? Are you at 100% magnification level, or larger or smaller?



See image, look at the top of the a, b, o... etc. This used to display cleanly. Using 60.0.3074.0 canary.
Clipboard01.png
23.3 KB View Download

Comment 28 by drott@chromium.org, Apr 19 2017

Thanks, gpa@, this looks like the Guardian comment section, is that right? 

http://roettsch.es/guardian.html looks indeed inferior on Canary - the web font used for the guardian section headers "Guardian Text Sans Web" at weight 700:
* does have a gasp table, but only uses font-smoothing values in it:

<gasp>                                                                                                                                                                                                                                                                                                              
    <gaspRange rangeMaxPPEM="8" rangeGaspBehavior="2"/>                                                                                                                                                                                                                                                             
    <gaspRange rangeMaxPPEM="65535" rangeGaspBehavior="3"/>                                                                                                                                                                                                                                                         
</gasp>                                                                                                                                                                                                                                                                                                             

* does not have hinting instructions, and  <maxInstructionDefs value="0"/> is indeed 0

So I assume, Skia takes this code path in SkFontScaler_DWrite, since there is a gasp table that was extracted, but 
range.fFlags.field.SymmetricSmoothing is false, so asymmetric rendering is choosen:

    } else if (get_gasp_range(typeface, SkScalarRoundToInt(gdiTextSize), &range)) {
        fTextSizeRender = realTextSize;
        fRenderingMode = range.fFlags.field.SymmetricSmoothing
                       ? DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
                       : DWRITE_RENDERING_MODE_NATURAL;

Fonttools does not dump the version number by default but I changed the g_a_s_p.py implemention of fonttools to assert on values other than 1, and it did then fail to decompile the guardian font extracted from the guardian website and used in http://roettsch.es/guardian.html. So I conclude that the Guardian fonts do use gasp version 0 tables.

So, I believe for our intents and purposes, we should ignore version 0 gasp tables for determining symmetric vs. asymmetric rendering mode.

Comment 29 by drott@chromium.org, Apr 19 2017

So, it's okay to merge
"2017-04-13 bungeman Symmetric rendering when >20px with DirectWrite." to the skia/chrome59 branch, but we still need a fix for version 0 gasp tables, such as on guardian.co.uk


drott@ -- Yes, sorry, should have said, it is indeed the grauniad comments section...

Comment 31 by drott@chromium.org, Apr 19 2017

 Issue 710880  has been merged into this issue.
Thanks drott@ do you want to fix the version 0 gasp tables issue as well, before merging changes?
> So, I believe for our intents and purposes, we should ignore version 0 gasp tables for determining symmetric vs. asymmetric rendering mode.

Indeed, but maybe not the way you want. A version 0 gasp table essentially means you probably should not be doing symmetric (which is the current behavior in any event). However, if there is no hinting there's no reason not to do symmetric, as all the issues we see with symmetric rendering are due to hinting which relies on dropout control or explicit deltas. If the font isn't hinted it's probably best to just ignore the gasp table and just use symmetric, especially at larger sizes. I'll have to go look at SimSun again...

In other words, I would like to cherry-pick as requested in comment #20 so that M59 isn't quite so bad. If we find more tweaks those will be in addition to this one, and we can cherry-pick those if we want them.
Labels: -Merge-Review-59 Merge-Approved-59
ok thanks for confirming - Approving merge request for in comment #20 for M59. That specific fix is tested in canary as confirmed in #26. 
Please merge your change to M59 branch #3071 latest before 4:00 PM PT, Monday (04/24) so we can take it for next week last M59 dev release. Thank you.

Comment 36 by drott@chromium.org, Apr 24 2017

Labels: Merge-Merged
Ben merged the change from #20 to chrome/m59 skia branch in https://skia.googlesource.com/skia/+/b5094c5dde4c1b36027271cfdec1c9ad58aeda09

We will still need a fix for the Guardian web fonts / gasp version 0 issue, also tracked separately in  issue 713942 , candidate CL in https://skia-review.googlesource.com/c/13863/.

Labels: Needs-triage-Mobile
Project Member

Comment 38 by sheriffbot@chromium.org, Apr 24 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Approved-59

Comment 40 by drott@chromium.org, Apr 25 2017

Status: Fixed (was: Assigned)
Marking this one Fixed, and labelled the remaining  issue 713942  as ReleaseBlock-Beta as well.

Sign in to add a comment