Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Opentype MATH tables

15 views
Skip to first unread message

Alexis Shaw

unread,
Mar 28, 2010, 12:13:12 AM3/28/10
to dev-tec...@lists.mozilla.org
Does anyone have information on this, I would like to implement this in
Firefox.
Also, after this has been implemented, I would like to rig the MathML type
to the web fonts infrastructure.

Frédéric Wang

unread,
Mar 28, 2010, 7:04:34 AM3/28/10
to Alexis Shaw, dev-tec...@lists.mozilla.org

I would be great if you could work on it!
I don't really know much about these MATH tables, but I think most
information/references are given by Karl at

http://www.mozilla.org/projects/mathml/fonts/

and

https://bugzilla.mozilla.org/show_bug.cgi?id=407059

At the moment, information about symbols built by part are stored in

layout/mathml/mathfontFONT.properties

and read in

http://mxr.mozilla.org/mozilla-central/source/layout/mathml/nsMathMLChar.cpp#317

HTH...

Frédéric Wang

unread,
Mar 28, 2010, 9:39:26 AM3/28/10
to Alexis Shaw, dev-tec...@lists.mozilla.org
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.

Frédéric Wang

unread,
Mar 28, 2010, 9:39:26 AM3/28/10
to dev-tec...@lists.mozilla.org, Alexis Shaw

Frédéric Wang

unread,
Apr 4, 2010, 5:10:48 AM4/4/10
to Alexis Shaw, dev-tec...@lists.mozilla.org
For bug 407059, we are only interested in the "variants" and "parts of
stretchy characters". Other info may be used elsewhere, but improving
stretching of characters is one of the most important MathML issue we
currently have. So I think it's better to concentrate on this for the
moment.

> I was asking because the opentype math tables encode much more than the
> stretchy tables. such as where to put superscript charactyers.
>

David Carlisle

unread,
Apr 4, 2010, 5:40:28 AM4/4/10
to Alexis Shaw, dev-tec...@lists.mozilla.org
On 28/03/2010 05:13, Alexis Shaw wrote:
> Does anyone have information on this,

Murray's post at

http://blogs.msdn.com/murrays/archive/2010/01/12/special-capabilities-of-a-math-font.aspx

has some information, and also says

If you want a complete specification of the math tables, please email
me. Hopefully someday the specification will be available as part of the
official OpenType standard. The mathfont.dll code was written by Sergey
Malkin.

David

0 new messages