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

STIXfonts & Mozilla MathML?

11 views
Skip to first unread message

Norber...@googlemail.com

unread,
Nov 13, 2007, 9:46:23 AM11/13/07
to
Hi there,

now that the first beta of STIXfonts is out (www.stixfonts.org) has
anybody tried using them with MathML in Mozilla? I would just love to
see what that looks like, but I don't even know what I would need to
do to access them.

Greetings,
Norbert

Urs Holzer

unread,
Nov 24, 2007, 5:54:23 AM11/24/07
to
Norber...@googlemail.com wrote:
> now that the first beta of STIXfonts is out (www.stixfonts.org) has
> anybody tried using them with MathML in Mozilla? I would just love to
> see what that looks like, but I don't even know what I would need to
> do to access them.

I am using linux.
It seems already to be enough to put the otf font files
into /usr/local/share/fonts. After doing this, firefox is able to
display some more characters than before. However, it does not use the
STIX fonts by default. I do not know how to configure firefox so it
uses them by default for MathML. However, you can set the font-family
to STIXGeneral in CSS for the math element and then it works perfectly!

Hm, I guess firefox has something like a basic CSS stylesheet which it
uses for all HTML documents. One could change this stylesheet to make
STIXGeneral the font used for math elements by default ...

Greetings
Urs

Justu...@piater.name

unread,
Nov 26, 2007, 2:15:03 AM11/26/07
to dev-tec...@lists.mozilla.org
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).

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 and
stretchy characters.

I also removed my font.mathfont-family preference.

Thanks,
Justus


Urs Holzer <u...@andonyar.com> wrote on Sat, 24 Nov 2007 11:54:23
+0100:

Urs Holzer

unread,
Nov 26, 2007, 2:31:38 PM11/26/07
to
Justu...@Piater.name wrote:

> 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:

Thanks for this hint!

> math {
> font-family: STIXGeneral, STIXVariants, STIXIntegralsSmall,
> STIXIntegralsDisplay, STIXIntegralsUp, STIXIntegralsUpSmall,
> STIXIntegralsUpDisplay, STIXSize1Symbols, STIXSize2Symbols,
> STIXSize3Symbols, STIXSize4Symbols, STIXSize5Symbols;
> }

> [...]


>
> 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 and
> stretchy characters.

From where do you get these font names? My fontviewer (this useless KDE
font viewer) says that there are only the following font-families:

STIXGeneral, STIXIntegrals, STIXSize1, STIXSize2, STIXSize3, STIXSize4,
STIXSize5, STIXVariants, STIXNonUnicode

Many of the font files belong to the same family! I believe that the
font system handles this automatically.
So I think the correct list is:

math {
font-family: STIXGeneral, STIXIntegrals, STIXSize1, STIXSize2,
STIXSize3, STIXSize4, STIXSize5, STIXVariants, STIXNonUnicode;
}

Or am I missing something? Am I doing something wrong?

Another thing: Does someone know how to find out in firefox from which
font a character of a rendered document has been taken?

Greetings
Urs

Karl Tomlinson

unread,
Nov 26, 2007, 3:56:15 PM11/26/07
to
Justu...@Piater.name 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".

Karl Tomlinson

unread,
Nov 26, 2007, 4:03:29 PM11/26/07
to
Urs Holzer writes:

> Justu...@Piater.name wrote:
>
>> math {
>> font-family: STIXGeneral, STIXVariants, STIXIntegralsSmall,
>> STIXIntegralsDisplay, STIXIntegralsUp, STIXIntegralsUpSmall,
>> STIXIntegralsUpDisplay, STIXSize1Symbols, STIXSize2Symbols,
>> STIXSize3Symbols, STIXSize4Symbols, STIXSize5Symbols;
>> }
>

> From where do you get these font names? My fontviewer (this useless KDE
> font viewer) says that there are only the following font-families:
>
> STIXGeneral, STIXIntegrals, STIXSize1, STIXSize2, STIXSize3, STIXSize4,
> STIXSize5, STIXVariants, STIXNonUnicode
>
> Many of the font files belong to the same family! I believe that the
> font system handles this automatically.
> So I think the correct list is:
>
> math {
> font-family: STIXGeneral, STIXIntegrals, STIXSize1, STIXSize2,
> STIXSize3, STIXSize4, STIXSize5, STIXVariants, STIXNonUnicode;
> }
>
> Or am I missing something? Am I doing something wrong?

You are not doing anything wrong. I believe this is a problem
with the fonts, which I have reported, but I have not yet heard a
reply.

These are OpenType fonts and the names you (Urs) are seeing are
those from the OpenType name tables. AIUI OpenType provides a
wrapper around a CFF (postscript) font. This CFF font has
different family names, which are the ones Justus has listed.

Freetype (used on Linux) only looks at the OpenType name tables. I
don't know what other systems do. (fontforge can show you both.)

Karl Tomlinson

unread,
Dec 6, 2007, 9:46:04 PM12/6/07
to
On Tue, 13 Nov 2007 06:46:23 -0800, Norbert Nemec wrote:

> now that the first beta of STIXfonts is out (www.stixfonts.org) has
> anybody tried using them with MathML in Mozilla? I would just love to
> see what that looks like, but I don't even know what I would need to
> do to access them.

The latest firefox (minefield) nightlies, since 2007-12-05, now
prefer STIX fonts by default when they are installed.

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/

There are still some rendering issues and occasional glyph
selection issues. Most notably mtable doesn't display, entities
corresponding to characters outside the Unicode BMP are not
correct yet, and especially on Windows, you may need to scroll or
cover enough of the Mozilla window with another window to get the
maths to paint. These issues are tracked here:

https://bugzilla.mozilla.org/showdependencytree.cgi?id=324857&hide_resolved=1

But you should be able to see what MathML looks like with STIX
fonts.

Ray Kiddy

unread,
Dec 7, 2007, 2:57:14 PM12/7/07
to

I am hoping that, someday, I can use MathML on a clean Firefox without
having to go install extra fonts. Is anyone on the lookout for a set of
fonts with a Moz-compatible license so that either the fonts can be
included in FF, distributed automatically with FF, or the use of them
can be made automatic somehow? (I know ways this can be done, but the
specifics are not the question here.)

I had to hunt a bit, but I found this license on the web site.

http://www.stixfonts.org/user_license.html

(The URL is simpler to type in than to navigate to....)

Is this license Moz-compatible? Do others want to see the MathML
included in more intuitive way?

FYI, I am coming at this as a Mac user. Forgive me if I am not aware of
progress or issues on other platforms.

thanx - ray

Daniel Jamous

unread,
Dec 7, 2007, 3:04:44 PM12/7/07
to Ray Kiddy, dev-tec...@lists.mozilla.org
Yes I agree. From the end user perspective it would be nice not to
have to install anything or at a minimum a level of complexity not
beyond say installing something like the Flash player.

Thanks,

Daniel

> _______________________________________________
> dev-tech-mathml mailing list
> dev-tec...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-mathml

Karl Tomlinson

unread,
Dec 7, 2007, 5:53:25 PM12/7/07
to
Ray Kiddy writes:

> I am hoping that, someday, I can use MathML on a clean Firefox
> without having to go install extra fonts. Is anyone on the lookout
> for a set of fonts with a Moz-compatible license so that either
> the fonts can be included in FF, distributed automatically with
> FF, or the use of them can be made automatic somehow? (I know ways
> this can be done, but the specifics are not the question here.)
>
> I had to hunt a bit, but I found this license on the web site.
>
> http://www.stixfonts.org/user_license.html
>
> (The URL is simpler to type in than to navigate to....)
>
> Is this license Moz-compatible? Do others want to see the MathML
> included in more intuitive way?

This would be nice.

We don't really want to add another megabyte to the Firefox
download and install for every use but an option or partially
automated download would be good.

For those that want to help make this happen this is the bug:

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

Karl Tomlinson

unread,
Dec 7, 2007, 5:57:17 PM12/7/07
to
Karl Tomlinson writes:

> But you should be able to see what MathML looks like with STIX
> fonts.

I forgot to mention that we are not yet using all of the glyphs
available in the STIX fonts for variant sizes of operators,
delimiters, and diacritical marks.

Contributions to extend the support are welcome at

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

Karl Tomlinson

unread,
Dec 7, 2007, 6:42:28 PM12/7/07
to
Ray Kiddy writes:

> ... Is anyone on the lookout


> for a set of fonts with a Moz-compatible license so that either
> the fonts can be included in FF, distributed automatically with
> FF, or the use of them can be made automatic somehow?

Asana Math is another font that might be suitable:

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

William F Hammond

unread,
Dec 8, 2007, 2:11:02 PM12/8/07
to Karl Tomlinson, dev-tec...@lists.mozilla.org
Karl Tomlinson <moz...@karlt.net> writes:

> Ray Kiddy writes:
>
>> I am hoping that, someday, I can use MathML on a clean Firefox
>> without having to go install extra fonts.

...


>> Is this license Moz-compatible? Do others want to see the MathML
>> included in more intuitive way?
>
> This would be nice.
>
> We don't really want to add another megabyte to the Firefox
> download and install for every use but an option or partially
> automated download would be good.

Not every use, but every user is interested in
documents that unbeknownst to her contain math.

If we're not careful, this kind of restriction could become
an obstacle to substantial deployment of MathML in web pages.

The additional download time is not significant.

For example, these days people commonly retrieve pdf files like
http://www2.imperial.ac.uk/ssherw/physflow/pfn/Meetings/Nottingham/Presentations/Notts%20Physiome%20Project%202005%20small.pdf
-- a document with math --
that are the size of the Firefox download.

Items of that size today require 10 seconds through an at-home
cable modem connection here in New York. Adding the STIX fonts
would change that to 10.8 seconds.

Add to the clamor at bugzilla in support of fixing bug 295193:
https://bugzilla.mozilla.org/show_bug.cgi?id=295193

-- Bill

Arthur Ralfs

unread,
Dec 9, 2007, 7:38:37 PM12/9/07
to dev-tec...@lists.mozilla.org
William F Hammond wrote:

> Karl Tomlinson <moz...@karlt.net> writes:
>
>
>> Ray Kiddy writes:
>>
>>
>>> I am hoping that, someday, I can use MathML on a clean Firefox
>>> without having to go install extra fonts.
>>>
> ...

>
>>> Is this license Moz-compatible? Do others want to see the MathML
>>> included in more intuitive way?
>>>
>> This would be nice.
>>
>> We don't really want to add another megabyte to the Firefox
>> download and install for every use but an option or partially
>> automated download would be good.
>>
>
> Not every use, but every user is interested in
> documents that unbeknownst to her contain math.
>
> If we're not careful, this kind of restriction could become
> an obstacle to substantial deployment of MathML in web pages.
>
>
I've added MathML capability to the CAS Axiom. I would really like
to see the appropriate fonts included with Firefox to make viewing
math content as easy as possible.

Arthur Ralfs

Peter Weilbacher

unread,
Dec 10, 2007, 7:08:31 AM12/10/07
to
On 07.12.2007 20:57, Ray Kiddy wrote:

> I am hoping that, someday, I can use MathML on a clean Firefox without
> having to go install extra fonts. Is anyone on the lookout for a set of
> fonts with a Moz-compatible license so that either the fonts can be
> included in FF, distributed automatically with FF, or the use of them
> can be made automatic somehow? (I know ways this can be done, but the
> specifics are not the question here.)
>
> I had to hunt a bit, but I found this license on the web site.
>
> http://www.stixfonts.org/user_license.html
>
> (The URL is simpler to type in than to navigate to....)
>
> Is this license Moz-compatible? Do others want to see the MathML
> included in more intuitive way?
>
> FYI, I am coming at this as a Mac user. Forgive me if I am not aware of
> progress or issues on other platforms.

Hmm, I'm not sure that it would be useful to ship fonts with Firefox. The
fonts have to be installed into the system to be visible to the browser,
right? The details of font installations are so different between the
platforms that I think it would be really difficult to do that. Or do we
have functions in Gecko that would allow system font installs?

Peter.

0 new messages