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

Issue 599046 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

SVG <text> with text-rendering=geometricPrecision not rendering correctly under Windows

Reported by mail.vi...@gmail.com, Mar 30 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

Example URL:
https://jsbin.com/cukiziheye/1/edit?html,output

Steps to reproduce the problem:
1. Navigate to https://jsbin.com/cukiziheye/1/edit?html,output in Windows Chrome.
2. Observe the output.

What is the expected behavior?
The 3 font waterfalls, Courier New, Arial and Times New Roman, at 0.25pt increments from 7pt to 10.75pt, should render smoothly: the right edges of the lines in each waterfall should form a straight line. The text is rendered in SVG, with text-rendering: geometricPrecision applied at the <body> level.

What went wrong?
There is noticeable stair-stepping of font size for all 3 fonts, with Courier New showing this the worst (only 4 different line lengths rendered).

At browser zooms other that 100%, font rendering becomes ugly (whilst remaining inaccurate), with uneven letter spacing e.g. compare how the "ju" of "jumps", or "az" of "lazy" is rendered at 125% browser zoom in Arial.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? No Latest Windows Opera, Mac OS/iOS Safari and Android Chrome

Chrome version: 49.0.2623.87  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 21.0 r0

According to the spec:

https://www.w3.org/TR/SVG11/painting.html#TextRenderingProperty

geometricPrecision: Indicates that the user agent shall emphasize geometric precision over legibility and rendering speed. This option will usually cause the user agent to suspend the use of hinting so that glyph outlines are drawn with comparable geometric precision to the rendering of path data.

Windows Firefox, IE and Edge, and Mac Chrome all respect geometricPrecision, and render the above example correctly. Windows Opera, Mac OS/iOS Safari and Android Chrome do not.
 
Browser Stack confirms that at least the Courier New waterfall rendered correctly in Chrome 37 i.e. the version where font rendering under Windows switched from GDI to DirectWrite. Versions 35/36 (GDI) rendered incorrectly, as did all versions after 37 (DirectWrite). So this did indeed work before, albeit briefly:

https://www.browserstack.com/screenshots/f3de9ab9cc44f0fe5554b3944578351a38d1dc4b
Components: -Blink Blink>SVG
Components: Blink>Fonts

Comment 4 by f...@opera.com, Mar 30 2016

Labels: -Type-Bug Needs-Bisect OS-Linux Type-Bug-Regression
Status: Available (was: Unconfirmed)
Seeing the same effect on Linux.
Cc: brajkumar@chromium.org
Labels: -Needs-Bisect -Type-Bug-Regression M-51 OS-Mac Type-Bug
Status: Untriaged (was: Available)
Able to reproduce the issue on Windows 7, Ubuntu 14.04 using chrome latest stable M49-49.0.2623.110 and latest canary M51-51.0.2695.1. Observed the geometric precision not rendering correctly as it's shown correctly on Mac OS 10.11.4.

This is a non-regression issue seen from past M35-35.0.1851.0 and M40-40.0.2192.0 , Hence marking it as untriaged.

Note: Unable to find the regression range to provide bisect information so removing bisect label.

Thanks!

Comment 6 by f...@opera.com, Mar 31 2016

Labels: Needs-Bisect
The reporter said: "...at least the Courier New waterfall rendered correctly in Chrome 37..." (https://bugs.chromium.org/p/chromium/issues/detail?id=599046#c1), so it ought to be possible to bisect from M37 to a later version - potentially no further than M38. Could we try that? (It's possible you already did this since you said "...seen from past M35-35.0.1851.0 and M40-40.0.2192.0." - in that case just remove the label again...)

Comment 7 by e...@chromium.org, Mar 31 2016

Cc: pdr@chromium.org
On windows this is intentional for DOM content for a handful of legacy fonts to improve legibility. For SVG and on other platforms it should not be the case however. 

pdr, are you aware of any changes to svg text handling lately?

Comment 8 by pdr@chromium.org, Mar 31 2016

I don't think this is recent, but I do think it's a bug. Even on linux this does not look correct to me.

We actually support text-rendering on html elements too and this looks wrong:
http://jsbin.com/yitobij

@eae, would you mind looking into this one?

Comment 9 by pdr@chromium.org, Mar 31 2016

Labels: -Needs-Bisect

Comment 10 by e...@chromium.org, Apr 1 2016

Status: WontFix (was: Untriaged)
We disable geometricPrecision for bitmap fonts and for certain legacy fonts to improve legibility. Switching to another font makes it render as expected.
Calling them "legacy" fonts trivialises the issue: the affected fonts are very widely used, and Chrome's inability to render them accurately under Windows means the browser cannot be considered for use with professional web-based design applications.

The fact that almost every other Windows browser can render these fonts both accurately and legibly means that browsers other than Chrome will more likely be used for such applications.

If Chrome chooses to sacrifice accuracy for legibility by default, then that is a choice of the browser. However, to disregard the specification and to rob web developers of the choice to prioritise accuracy should not be acceptable.

Is there any reason why geometricPrecision, when explicitly specified, can't cause Chrome to render fonts in a geometrically precise way, always?

Comment 12 by f...@opera.com, Apr 1 2016

Status: Available (was: WontFix)
FWIW, I agree with what you're saying, and will use up some of my supposed brownie  points by reopening this bug.

The "original intention" of the 'geometricPrecision' property is indeed to try to achieve linear font scaling - for purpose such as scaling animations and decorative text. (Outside of such use cases you should really shy away from it though... this value is not for making text readable.)

That being said though, using bitmap fonts for such use cases is pretty counterintuitive.

Maybe we could get a (TextRun) flag to force enable it for SVG content?
Thank you for re-considering fixing this.

Comment 14 by e...@chromium.org, Apr 4 2016

Cc: kojii@chromium.org e...@chromium.org
You're right fs, if geometricPrecision is specified we should override legacy fonts check.

Adding to back-log.

Thanks!
Project Member

Comment 15 by sheriffbot@chromium.org, Apr 5 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
Labels: PaintTeamTriaged-20170405 BugSource-User
Project Member

Comment 18 by sheriffbot@chromium.org, Apr 13 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Comment 20 by papal...@gmail.com, Apr 13 2018

Comment 12:

> That being said though, using bitmap fonts for such use cases is pretty counterintuitive.

Bitmap fonts, isn't that issue 797496? While issue 797496 might only have Linux as the specified OS where it occurs the code in question there also appears in FontPlatformDataWin.cpp

Sign in to add a comment