[Webkit-unassigned] [Bug 156148] [GTK] Since the SVG -> OTF Font Converter was enabled, some SVG layout tests are failing.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 5 05:38:08 PDT 2016


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

--- Comment #9 from Carlos Alberto Lopez Perez <clopez at igalia.com> ---
(In reply to comment #7)
> (In reply to comment #6)
> > I don't understand the interaction between how we use FreeType and Harfbuzz,
> > but keep in mind that we do use and depend on both.
> (In reply to comment #6)
> > I don't understand the interaction between how we use FreeType and Harfbuzz,
> > but keep in mind that we do use and depend on both.
> 
> We follow the specification in the Microsoft docs (meaning: we don't use any
> Apple-specific extensions).
> 
> The best way to save the generated file is to modify convertSVGToOTFFont()
> in SVGToOTFFontConversion.cpp. It returns an Optional<Vector<char>>. Just
> before returning, that function could write out the vector to a file. (Keep
> in mind you'll have to modify the WebKit2 sandbox rules to allow the Web
> Process access to the disk)

Not sure if the WebKit2 sandbox is not enabled/working on the GTK+ port
or if it is enabled but allowing write to /tmp, but I was able to dump the OTF
file generated to disk with just something like this
http://people.igalia.com/clopez/wkbug/156148/SVGToOTFFontConversion_todisk.diff

I uploaded that generated OTF font to here http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/SVGFreeSans.otf

I also converted the original SVG font to OTF using onlinefontconverter.com
and uploaded it to here http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/SVGFreeSans_onlinefontconverter.com.otf



And I have compared the two OTF fonts with some utilities and this are the main differences I can see:

 1) Difference in tables

- The OTF font generated by WebKit has a kern table. But the one generated by onlinefontconverter.com has instead a GPOS one.

- List of tables for OTF font generated by WebKit: http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/SVGFreeSans_ttxtables.txt
- List of tables for OTF font generated by onlinefontconverter: http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/SVGFreeSans_onlinefontconverter.com_ttxtables.txt

2) Converting the OTF font to ttx format (a short of xml that the ttx utility from fonttools produces) causes errors with the WebKit otf font but not with the onlinefontconverter OTF one:

- The conversion from the OTF font generated by WebKit gives this errors: http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/SVGFreeSans_ttxdetails_stderr.txt and generated this XML http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/SVGFreeSans_ttxdetails.xml
- The conversion from the OTF font generated by onlinefontconverter gives no error: http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/SVGFreeSans_onlinefontconverter.com_ttxdetails_stderr.txt and generates this XML http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/SVGFreeSans_onlinefontconverter.com_ttxdetails.xml

- Trying to convert the xml back to otf is only possible with the OTF font generated by onlinefontconverter, with the WebKit one the ttx utility aborts with an ugly backtrace.


3) To conclude my tests, I have also created this test page:

http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/onlinefontconverter.com/test_svg_otf.html

 - And generated 3 screenshots at http://people.igalia.com/clopez/wkbug/156148/SVGFreeSans/screenshots/

As you can see there is a clear difference between the results rendered with the OTF font generated by WebKit and the one generated by onlinefontconverter.

This difference is also appreciable in  safari from current webkit trunk.

So.... I may be wrong, but I think there is something wrong with the OTF font that WebKit generates.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160405/7869b0f8/attachment.html>


More information about the webkit-unassigned mailing list