# [Webkit-unassigned] [Bug 128907] New: Migrate the MathML stretchy code from UChar to Glyph

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 17 06:40:51 PST 2014

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

Summary: Migrate the MathML stretchy code from UChar to Glyph
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P2
Component: MathML
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: fred.wang at free.fr
CC: bfulgham at webkit.org, mrobinson at webkit.org

Created an attachment (id=224362)
--> (https://bugs.webkit.org/attachment.cgi?id=224362&action=review)
WIP Patch

We want to move towards using only fonts with the MATH table so that one only need to specify such a font on the [itex] tag (see https://bugzilla.mozilla.org/show_bug.cgi?id=947654 for the Gecko equivalent). The MathML stretchy code currently uses UChar to stretch by parts. This will only work for a few characters that have Unicode constructions like parenthesis or braces but in general we should use Glyph index.

The attached patch tries to replace UChar with Glyph. This seems to work for some fonts but I'll need to test it more. Some remarks:

- I'm assuming that all the characters will use the same SimpleFontData (determined from the base character). In particular, we won't be able to use pieces from different fonts and indeed we don't want that or otherwise the pieces may not glue together perfectly. For fonts with a MATH table, all the pieces come from the same font so that's what we want. However, this won't work with non-MATH fonts like STIX General or MathJax. I don't think we can get the SimpleFontData from a glyph index, so there is not any other choice than using the base character anyway since pieces may be non-Unicode glyphs.

- At the moment, the table of UChar is still used to described construction. However, STIX Math (perhaps others) don't map the glyph to Unicode code points (https://github.com/mathjax/MathJax/wiki/STIX-feedback#wiki-technical-issues) so this method won't work. So we will probably need to use either the MATH table on Linux or some hardcoded tables on other ports.

- We will need to switch to the MATH fonts. I'm assuming that STIX Word (including STIX Math) is installed on Mac OS Lion but perhaps https://github.com/khaledhosny/xits-math/ would be a better choice as it fixes many bugs in STIX. STIX General could be dropped. I'm wondering what is the status on iOS, but Symbol is not a MATH font and should not be used.

- The patch exposes a new drawGlyphs method. I hope it works on all platforms for non-Unicode glyphs.

--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.