[Webkit-unassigned] [Bug 215321] SVG text element with text-anchor: middle is misaligned using icon font

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 13 06:51:16 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=215321

--- Comment #4 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
(In reply to Said Abou-Hallawa from comment #2)
> It looks like ligatures are not handled correctly for SVG fonts.
> 
> For example the test case contains the text "expand_more" which is supposed
> to be drawn by one glyph. When getting the width of this text, we loop
> through all the characters one by one and sum the widths of all the
> characters. But because the widths of all the characters are 38 which is the
> width of the ligature, we end up adding this width 11 times. And we get the
> width = 418 instead of getting 38. See
> SVGTextLayoutEngine::recordTextFragment().

Fixed by this commit in Blink:

https://chromium.googlesource.com/chromium/src.git/+/f75cb329068c3768b2d4e6b0c0243795c81d1ae6

It might be above my expertise to merge but still looking into how to do.

I think Blink introduced 'line layout' specific to SVG sometime after split and it is not 1-1 merge.

-- 
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/20230513/08fd6325/attachment.htm>


More information about the webkit-unassigned mailing list