Bug 253137

Summary: SVG tspan renders incorrectly with RTL languages (Arabic)
Product: WebKit Reporter: Gilberto <kiewic>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: mmaxfield, sabouhallawa, simon.fraser, webkit-bug-importer, zalan, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: All   
OS: All   
Attachments:
Description Flags
SVG tspan repro with Arabic text
none
SVG text tspan with Arabic text rendered in other browsers
none
SVG text tspan with Arabic text rendered in Safari none

Description Gilberto 2023-02-28 22:14:29 PST
Created attachment 465233 [details]
SVG tspan repro with Arabic text

An SVG with multiple text tspan renders incorrectly. In the attached example, there are two tspan, the second one has a dx shift, however somehow the shift is applied to a substring of the first tspan. It gives the impression that some characters from the first <tspan> have exchange position with the content of the second <tspan>. Even if this was by design, the rest of the styles are not applied as expected. For example, the "text-anchor: middle" fails to horizontally align the text to the middle.
Comment 1 Gilberto 2023-02-28 22:15:56 PST
Created attachment 465234 [details]
SVG text tspan with Arabic text rendered in other browsers
Comment 2 Gilberto 2023-02-28 22:16:21 PST
Created attachment 465235 [details]
SVG text tspan with Arabic text rendered in Safari
Comment 3 Radar WebKit Bug Importer 2023-03-07 22:15:16 PST
<rdar://problem/106406726>