WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
210484
Ascent/descent of SVG Fonts converted using SVGToOTFFontConversion is wrong, breaking text selection
https://bugs.webkit.org/show_bug.cgi?id=210484
Summary
Ascent/descent of SVG Fonts converted using SVGToOTFFontConversion is wrong, ...
Nikolas Zimmermann
Reported
2020-04-14 02:34:52 PDT
Created
attachment 396391
[details]
Patch When comparing SVG Fonts converted to OTF using FontForge and using WebKits builtin SVGToOTFFontConversion it is evident that the HHEA table is incorrect. The ascent/descent (HheaAscent/HheaDescent) stored in the HHEA table is currently equivalent to the typographic ascent/descent, as specified in the SVGFontFaceElement. This is not correct, it should be computed as unite of the individual glyph bounding boxes. Currently this wrong behavior leads to broken text seleciton when using SVG Fonts. The text selection highlight is placed incorrectly. This is easiy visible when converting the SVG Font to OTF using e.g. FontForge and comparing the text selection rects.
Attachments
Patch
(731.35 KB, patch)
2020-04-14 02:34 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch
(740.11 KB, patch)
2020-04-14 02:40 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch
(1.54 MB, patch)
2020-04-15 02:42 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch
(1.78 MB, patch)
2020-04-15 03:57 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch
(1.91 MB, patch)
2020-04-16 14:48 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch
(1.99 MB, patch)
2020-04-20 00:22 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch
(2.21 MB, patch)
2020-04-20 02:36 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch
(2.21 MB, patch)
2020-04-22 00:20 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch
(2.21 MB, patch)
2020-04-22 08:44 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2020-04-14 02:40:17 PDT
Created
attachment 396392
[details]
Patch
Nikolas Zimmermann
Comment 2
2020-04-14 02:41:32 PDT
TODO: - Missing one reftest to compare SVG Fonts->OTF on-the-fly conversion vs. FontForge converted SVG Fonts - Expecations for mac (going through EWS to obtain them)
Nikolas Zimmermann
Comment 3
2020-04-15 02:42:00 PDT
Created
attachment 396517
[details]
Patch
Nikolas Zimmermann
Comment 4
2020-04-15 03:57:11 PDT
Created
attachment 396519
[details]
Patch
Nikolas Zimmermann
Comment 5
2020-04-16 14:48:21 PDT
Created
attachment 396700
[details]
Patch
Nikolas Zimmermann
Comment 6
2020-04-20 00:22:04 PDT
Created
attachment 396956
[details]
Patch
Nikolas Zimmermann
Comment 7
2020-04-20 02:36:42 PDT
Created
attachment 396961
[details]
Patch
Nikolas Zimmermann
Comment 8
2020-04-22 00:20:22 PDT
Created
attachment 397176
[details]
Patch
Nikolas Zimmermann
Comment 9
2020-04-22 08:44:35 PDT
Created
attachment 397195
[details]
Patch
Nikolas Zimmermann
Comment 10
2020-04-22 14:09:49 PDT
*sigh* I need access to a local Mac :-) This patch works flawlessly on Gtk/WPE (FreeType based font rendering) but shows issues on macOS, most noticeable on svg/text/kerning.svg, which is broken with the patch. Will investigate, no need to review until I get this sorted out.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug