Re: Opentype MATH tables
Frédéric Wang <[email protected]> Sun, 28 Mar 2010 15:39:26 +0200
| Newsgroups | gmane.comp.mozilla.devel.mathml |
|---|---|
| Message-ID | <[email protected]> |
Alexis Shaw wrote:
> I am new to the mozilla project, is there anywhere that I can get an
orientation.
First, you should understand how the support for stretchy characters works:
http://mxr.mozilla.org/mozilla-central/source/layout/mathml/mathfont.properties#506
As an example, consider the file mathfontSTIXSize1.properties:
http://mxr.mozilla.org/mozilla-central/source/layout/mathml/mathfontSTIXSize1.properties#43
You can read line 58 in that way:
- \u007B is the unicode value for the left brace '{'
- it can be built using a composition of glyphs with
\u23A7 for the top part
\u23A8 for the middle part
\u23A9 for the bottom part
\u23AA as a glue symbol
- or it can be drawn using a single glyph, where @N indicates that we
take the glyph into the font external.N
I think a first step is to use fontforge or XeTeX to read the tables
"Vertical and Horizontal Glyph Variants" and "Vertical and Horizontal
Glyph Construction" in Asana-Math:
http://fontforge.sourceforge.net/math.html
Then create a mathfontAsana-Math.properties that you fill with the
corresponding values and test if the symbols stretch correctly. Once you
get familiar with how the whole thing works, the next step will be to
directly read the MATH table (cpp file I mentioned in my previous message).
To test Asana-Math with Mozilla, install the font on your system (of
course) and open the page about:config. Here you can modify the string
"font.mathfont-family" to use Asana-Math. Bug 536438 has been recently
fixed on trunk, so you should also be able to create the following
strings if you want to test a particular character uNNNN:
"font.mathfont-family.\\uNNNN.base" -- fonts for the base size
"font.mathfont-family.\\uNNNN.variants" -- fonts for larger glyphs
"font.mathfont-family.\\uNNNN.parts" -- fonts for partial glyphs
If you need more help, don't hesitate to ask on this list or in bugzilla.