[webkit-dev] Reading Open Type tables in WebKit?

Frédéric WANG fred.wang at free.fr
Wed Mar 19 23:43:36 PDT 2014


Hi all,

I'm trying to implement the OpenType MATH table [1] in WebKit in order 
to improve the MathML support. I've already made some progress and split 
the work into several steps [2]. For people who are interested, here are 
some screenshots showing some rendering improvements:

http://www.ulule.com/mathematics-ebooks/news/screenshots-31369/

There was already some code in 
Source/WebCore/platform/graphics/opentype/ to read OpenType tables so 
I've been able to reuse it for the MATH table. However, this code is not 
compiled on all platforms. At the moment I'm only able to compile the 
support for OpenType MATH table with the following condition:

USE(FREETYPE) || (PLATFORM(WIN) && (USE(CG) || USE(CAIRO)))

which I think means it will work on Linux (I tested the EFL and GTK 
ports) and most Windows platforms (not tested yet). This means that for 
the Mac port, I can not do better than using big hardcoded tables... 
That can be a temporary solution, but it would be better to read the 
font tables directly in order to get support for arbitrary MATH fonts 
and to make maintenance easier.

So I'd like to know if the current font API on the Mac port has some 
features to load OpenType tables? As a comparison on Gecko, I've used 
Harfbuzz to read the MATH table and this library is also available on 
Mac. I heard that Blink was moving to Harfbuzz on all platforms, so I'm 
also wondering if there are plans to do the same for WebKit? This would 
allow to support OpenType tables on all platforms...

Thank you,

[1] MATH table references:
http://mpeg.chiariglione.org/standards/mpeg-4/open-font-format/call-proposals-isoiec-14496-22-open-font-format-color-font
http://www.ntg.nl/maps/38/03.pdf
"The MATH table and OpenType Features for Math Processing" (Microsoft's 
document, not public yet ; send me a private mail if you want to get a copy)

[2] Bugzilla references:
https://bugs.webkit.org/show_bug.cgi?id=130321
https://bugs.webkit.org/show_bug.cgi?id=130322
https://bugs.webkit.org/show_bug.cgi?id=130324
https://bugs.webkit.org/show_bug.cgi?id=130325

-- 
Frédéric Wang
MathML Crowdfunding: ulule.com/mathematics-ebooks



More information about the webkit-dev mailing list