[webkit-reviews] review requested: [Bug 210484] Ascent/descent of SVG Fonts converted using SVGToOTFFontConversion is wrong, breaking text selection : [Attachment 396391] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 14 02:34:52 PDT 2020


Nikolas Zimmermann <zimmermann at kde.org> has asked  for review:
Bug 210484: Ascent/descent of SVG Fonts converted using SVGToOTFFontConversion
is wrong, breaking text selection
https://bugs.webkit.org/show_bug.cgi?id=210484

Attachment 396391: Patch

https://bugs.webkit.org/attachment.cgi?id=396391&action=review




--- Description ---
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.


More information about the webkit-reviews mailing list