Re: STIXfonts & Mozilla MathML?

Karl Tomlinson <[email protected]>
Newsgroups gmane.comp.mozilla.devel.mathml
Message-ID <[email protected]>
[email protected] writes:

> It seems to me that the right way to do this on a per-user basis is to
> create/edit the file
> ~/.mozilla/firefox/<profile>/chrome/userContent.css and add something
> like the following to it:
>
> math {
>   font-family: STIXGeneral, STIXVariants, STIXIntegralsSmall, STIXIntegralsDisplay, STIXIntegralsUp, STIXIntegralsUpSmall, STIXIntegralsUpDisplay, STIXSize1Symbols, STIXSize2Symbols, STIXSize3Symbols, STIXSize4Symbols, STIXSize5Symbols;
> }
>
> This overrides the corresponding MathML font selection in the
> stylesheet Urs referred to, and displays variables in math italic and
> not text italic (and not text italic as with Urs' method).

(I haven't tried this, but it sounds like a good way.)

>
> This does not list all available fonts, and I'm not sure which of
> these are actually needed (probably all available in general), but it
> seems to render my math correctly, including math bold italic...

I suspect STIXGeneral is providing all the non-stretchy chars, so
the other families won't be used.

Putting your favourite STIXIntegrals* family before STIXGeneral
should use that for the integrals but all those integral fonts
report family as "STIXIntegrals" (on Linux at least), so it's
difficult to be specific.

> ... and stretchy characters.

To use STIX fonts for the stretchy chars, you really need to
provide appropriate mathfont*.properties files, and set the
font.mathfont-family preference.

I don't know of a way to provide the properties files on a per
user basis, as I think they need to be in the res/fonts directory.
(They are loaded from resource://gre/res/fonts/.)

The mathfontSTIXNonUnicode.properties file at
https://bugzilla.mozilla.org/show_bug.cgi?id=400938#c6
should be suitable.

And the mathfontSTIXSize1.properties file at
https://bugzilla.mozilla.org/show_bug.cgi?id=400938#c7
will provide a start.

But for complete support in Gecko 1.8, the appropriate subset of
lines should be taken from the file at
https://bugzilla.mozilla.org/show_bug.cgi?id=400938#c10
and the remainder placed in a file named
"mathfontSTIXGeneral.properties".

A suitable value for font.mathfont-family would be
"STIXNonUnicode, STIXSize1, STIXGeneral".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.