[Webkit-unassigned] [Bug 215321] New: SVG text element with text-anchor: middle is misaligned using icon font
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 10 06:16:59 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=215321
Bug ID: 215321
Summary: SVG text element with text-anchor: middle is
misaligned using icon font
Product: WebKit
Version: Safari 13
Hardware: Macintosh
OS: macOS 10.15
Status: NEW
Severity: Normal
Priority: P2
Component: SVG
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dnegley at gmail.com
CC: zimmermann at kde.org
Created attachment 406294
--> https://bugs.webkit.org/attachment.cgi?id=406294&action=review
Example SVG file
Consider the attached svg file, which contains this snippet
<g transform="translate(200 200)">
<rect width="200" height="58" rx="4" ry="4" fill="lime">
</rect>
<circle cx="29" cy="29" r="19" fill="yellow">
</circle>
<text x="29" y="29"
style="dominant-baseline: central; font: 400 38px / 14px "Material Icons Round"; text-anchor: middle;">expand_more</text>
</g>
along with the embedded "Material Icons Round" font in the <defs> section.
the text and the circle have the same x attribute, therefore they should be positioned in the same spot.
in Safari, the text element is too far to the left. it appears as if the position is based on the measured string "expand_more" and not the measured text element.
using a shorter icon name like <text>build</text> will result in an icon placed farther to the right, although the text elements are the same size.
removing the font name and using a single character like "+" in the text element produces the expected result.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200810/444c4094/attachment.htm>
More information about the webkit-unassigned
mailing list