Red Hat Bugzilla – Bug 118179
Mozilla's font display of MathML is incorrect
Last modified: 2007-11-30 17:07:00 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030922
Description of problem:
Mozilla fails to display MathML with correct font, even if the
required MathML fonts are installed (see below).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Go to http://www.mozilla.org/projects/mathml/fonts/ and install the
TeX and Mathematica fonts required for Mozilla's MathML functionality.
2. Open the W3C's MathML test suite http://www.w3.org/Math/testsuite/
Actual Results: The font display is completely messed up, with
(LaTeX's) \in instead of 2, etc.
Expected Results: Correct MathML rendering in compliance to W3C's
The Mozilla-Bug http://bugzilla.mozilla.org/show_bug.cgi?id=212400 is
likely the cause.
We'll be releasing a 1.4.2 branch build that should fix this soon.
Created attachment 103811 [details]
Patch to /usr/lib/mozilla-1.4.3/res/mathml.css
With the newest RHEL update, the problem seems to be still there (Mozilla
version 1.4.3). However, as I found a solution, I think reopen this bug is
First some explaination why this behavior is still there:
1. At least on RHEL (because of UTF-8?), it is neccessary for the Latin font to
be in front of Symbol (Greek), otherwise the Greek glyph is preferred over the
Latin one, even for ordinary Latin letters. See also
http://silas.psfc.mit.edu/tth/symfontconfig.html for another reference about
2. Times is not available as XFT (TrueType) font, therefore it should be
changed to one that is available (specifically for RHEL: Thorndale and maybe
some people have Times New Roman installed).
My proposed change to mathml.css is included. The resulting rendering is not
100% W3C conform, but should be usable now for anyone who install the proper
It appears that neither the current seamonkey nor the current firefox packages
(seamonkey-1.0.4-0.5.1.fc5, firefox-22.214.171.124-2.fc5) in FC5 are Xft-enabled.
The mozilla package (mozilla-1.7.13-1.1.fc5) is. Part of the solution to
making MathML possible is to have browsers that can access the True Type fonts
that support it. That's much better than having the users try to figure out
how to find and make accessible any Type 1 Postscript support.
The other half of the solution appears to be to have the fonts available
accessible. It looks like the mathml-fonts package (mathml-fonts-1.0-21.fc5)
installs its fonts in /usr/share/fonts/mathml, but doesn't integrate them into
Xft properly per the instructions in, e.g., the Fedora Core 3 or 4 Release
Notes. In other words, one needs to run ttmkfdir, mkfontdir, and chkfontpath
on any suitable font directories. There may be other font-including
directories that are missing this apparatus, too.
Apart from the mathml-fonts fonts, one also needs the Mathematica 4.1 fonts in
True Type form, and they can't be distributed. The user has to get them from
Wolfram. Maybe some kind of "get and install" tool could be provided. Or
maybe Wolfram would be kind enough to distribute the configured files in
Also, one needs a symbol font, and the easiest ways to get this are to link
the AdobeReader font directory, or the OpenWindows one, into /usr/share/fonts,
and run the installation scripts on them, too. I don't suppose the Adobe
folks would be thrilled to do this, though they do provide their reader in a
package format. But, more generally, any True Type font directory in an fc5
package should perhaps be linked to /usr/share/fonts (or installed there) and
If all these were done, there would be a good chance that eventually MathML
would work out of the box.
The general procedure above is suggested at
http://draal.physics.wisc.edu/Notes/MathML, on the assumption that one has an
REOPENED status has been deprecated. ASSIGNED with keyword of Reopened is preferred.
Reporter, are you able to reproduce this bug with the latest firefox/seamonkey
package in the latest upgrade of RHEL 3, please?
Probably. I don't believe we ship the right fonts by default. But downloading
mathematica should help.
Created attachment 155709 [details]
Upstream patch for the upstream bug 212400
Concerning fonts -- we have in Extras mathml-fonts package, which is not perfect
(still missing tons of glyphs from Wolfram's Mathematica), but it allows me to
got to 27xx on Mozilla character testing
(http://www.mozilla.org/projects/mathml/fonts/chars/table.html). Would it be
that much difficult to push at least mathml-fonts package into standard spin of
Concerning the W3C testing suite itself, I was able to get through General/Math
types and only on General/GenAttribs/attribQuote1 Mozilla complained about
missing fonts with proper dialog and with information about where to get proper
So, my conclusion is that this should be fixable with newer versions of a
My original comments to mcelrath relative to his valuable instructions on how
to get MathML working. His steps - what fonts to collect and install and
running ttmkfdir, mkfontdir, and chgfontpath have to be followed exactly to
get a TrueType solution to work. I never found a working PostScript
solution. All the instructions were for different Linux setups than the
current Red Hat-Fedora one.
Date: Wed, 09 Aug 2006 18:51:20 -0600
From: John Koontz <email@example.com>
Subject: MathML Wiki Page
I'm very grateful for http://draal.physics.wisc.edu/Notes/MathML, which along
with the Fedora Core 4 Release Notes helped me get SeaMonkey and Firefox
browsing MathML in Fedora Core 5, where the instructions at
http://www.mozilla.org/projects/mathml/fonts/ did not. Thanks!
Addenda for Fedora Core 5 (FC5)
Comment 1 did not seem to apply to Fedora Core 5 (FC5). However, the FC5
package versions of SeaMonkey (c. 1.0.2) and Firefox (c. 1.6) seem to be Xft-
disabled. [no longer true] Mozilla (legacy package) is Xft-enabled. [now part
of seamonkey, and broken seamonkey has been fixed] To get Xft-enabled
versions of the first two (capable of processing True Type fonts), go to
mozilla.org and download the tarballs from there.
Re. 2.1.1, in Fedora (FC5) you can get the MathML fonts in the mathml-fonts
package. They have not been processed with ttmkfdir, mkfontdir, and
chgfontpath, however, and you will have to do that per the instructions in the
FC4 (but not FC5) release notes at http://fedora.redhat.com/docs/release-
notes/fc4 (search for Xft).
Re. 2.2, if you have AdobeReader_enu-7.0.8-1 installed,
ln -s /usr/local/Adobe/Acrobat7.0/Resource/Font/ adobe
If you have openoffice.org-core installed,
ln -s /usr/lib/openoffice.org2.0/share/fonts/truetype openoffice
ln -s /usr/lib/openoffice.org2.0/share/fonts openoffice
would be more kosher, though I'm not sure how that affects the running of
Re. 4, not necessary in Fedora (FC5), but you do have to run the ttmkfdir,
etc., scripts in each directory you appropriate (/usr/share/fonts/mathml),
create (/usr/share/fonts/mathematica) or link in (/usr/share/fonts/adobe or
If you install the object code tarballs for firefox or seamonkey they are best
put in /usr/local/appname-appvers where they will not conflict with the
existing packages in /usr/bin, /usr/lib, etc. For ease of management, make
symbolic links from /usr/local/appname to /usr/local/appname-appvers and
from /usr/local/bin/appname to /usr/local/appname/appname, where appname and
appvers are seamonkey or firefox and their current versions. This eases
changing versions. You'll want /usr/local/bin before /usr/bin in your paths.
You can rename /usr/local/bin/appname to appname.off or link it
to /usr/bin/appname if needed.
Better Wolfram font source:
In more detail the process is:
Part II: Beautifully (or more beautifully)
To get a nicer version - no idea if it is up to snuff with the picky - you
need nicer fonts. Here is how you get them. For now the quick version. This
is based on
which starts all too accurately
Getting MathML working on linux is a bitch, despite the fact that MathML
support is compiled into Mozilla versions 1.4 and higer. The problem is in
getting Mozilla to find the required fonts. Here are the basic requirements:
A less adequate version with the wrong commands is at
Get the TTF versions of the Mathematica 4.1 fonts and put them
in /usr/share/fonts/mathematica. (Not later versions - 4.1 is what you want.)
Make sure the mathml-fonts package is installed, in which case they are
Put a links in for the AdobeAcrobat and/or OpenOffice symbol fonts:
 > ls -l openoffice adobe
lrwxrwxrwx 1 root root 42 Aug 8 19:28 adobe -
lrwxrwxrwx 1 root root 47 Aug 8 19:30 openoffice -
Might be more conventional to link above the truetype level in the latter
case. You only really need one of these. OpenOffice is probably installed,
but you only have the Acrobat fonts if you went to the Adobe site and got the
AdobeReader (not Acrobat anymore) package and installed it.
Make sure that the Microsoft symbol font (symbol.ttf) is not installed. (It
wasn't in my case.)
In regard to each of the directories above run
Create the /usr/share/fonts/local/ directory (if it doesn't already exist):
Copy the new font file into /usr/share/fonts/local/
Update the font information by issuing the following commands (note that, due
to formatting restrictions, the following commands may appear on more than one
line; in use, each command should be entered on a single line):
ttmkfdir -d /usr/share/fonts/local/ -o /usr/share/fonts/local/fonts.scale
If you had to create /usr/share/fonts/local/, you must then add it to the X
font server (xfs) path:
chkfontpath --add /usr/share/fonts/local/
Substitute the actual directory, e.g., mathml, for local.
Note that "fontpath" here is what you otherwise manipulate with xset fp (see
man page), but this is better and permanent. (I don't think xset is
This is pretty much it.
The required fonts are MathML + Mathematica 4.1 + a Symbol font.
The main thing that is difficult is providing the Mathematica 4.1 True Type
fonts. Wolfram does not seem to provide a suitable distribution on these,
though they do distribute them with a fair degree of freedom. Perhaps they
could be persuaded to do so, or perhaps an equivalent that is sutably
distributed can be found.
Their policies are stated at
(referred from http://www.mozilla.org/projects/mathml/fonts/)
For some reason they provide the files in an easy format for Windows and Macs,
but not for Linux. They require you to come to this site. This precludes a
*.rpm in general circulation.
As far as alternatives, see http://www.stixfonts.org/. Very close.
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
For more information of the RHEL errata support policy, please visit:
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.