SVG <text> with text-rendering=geometricPrecision not rendering correctly under Windows
Reported by
mail.vi...@gmail.com,
Mar 30 2016
|
||||||||||||||||
Issue descriptionUserAgent: 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.
,
Mar 30 2016
,
Mar 30 2016
,
Mar 30 2016
Seeing the same effect on Linux.
,
Mar 31 2016
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!
,
Mar 31 2016
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...)
,
Mar 31 2016
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?
,
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?
,
Mar 31 2016
,
Apr 1 2016
We disable geometricPrecision for bitmap fonts and for certain legacy fonts to improve legibility. Switching to another font makes it render as expected.
,
Apr 1 2016
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?
,
Apr 1 2016
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?
,
Apr 1 2016
Thank you for re-considering fixing this.
,
Apr 4 2016
You're right fs, if geometricPrecision is specified we should override legacy fonts check. Adding to back-log. Thanks!
,
Apr 5 2017
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
,
Apr 5 2017
,
Apr 5 2017
,
Apr 13 2018
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
,
Apr 13 2018
,
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 |
||||||||||||||||
Comment 1 by mail.vi...@gmail.com
, Mar 30 2016