Bug 212972

Summary: stroke-dasharray wrong sizing on text
Product: WebKit Reporter: Jeremie Patonnier <jeremie.patonnier>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: mmaxfield, sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=72401
Attachments:
Description Flags
Firefox and Chrome rendering
none
Safari 13 rendering none

Description Jeremie Patonnier 2020-06-09 08:20:19 PDT
Created attachment 401440 [details]
Firefox and Chrome rendering

It seams that stroke-dasharray applied on a an SVG <text> element isn't handled properly.

Here's a test case: https://codepen.io/JeremiePat/pen/ZEQbyKY

It looks like Safari isn't computing dash length properly. Safari is producing more than a hundred of dash where Firefox and Chrome only produce roughly ten dash (as expected). It feels like the dash are computed in the screen coordinate system without adjusting for the viewBox scale (see https://twitter.com/AmeliasBrain/status/1270353669897072645)
Comment 1 Jeremie Patonnier 2020-06-09 08:20:48 PDT
Created attachment 401441 [details]
Safari 13 rendering
Comment 2 Radar WebKit Bug Importer 2020-06-09 11:36:13 PDT
<rdar://problem/64172774>
Comment 3 Said Abou-Hallawa 2020-06-09 12:26:21 PDT
r254657 fixed the rectangle display, which has the attribute pathLength, except from a glitch at the top-left corner.