Math Fonts at Firefox OS

Published on June 17, 2014.

Note

This post was previous published at blog.rgaiacs.com. Some links might got broken during the conversion from reStructuredText to Markdown.

When dealing with math you need to have at least one font that has all the symbols needed with support to scale it. With at least one font properly installed, when visit https://www.mozilla.org/en-US/styleguide/products/firefox-os/typeface/ you will see something like:

Screenshot of Firefox.
Screenshot of Firefox.

Otherwise, you will see something like:

Screenshot of Firefox OS at Flatfish.
Screenshot of Firefox OS at Flatfish.

Today I work trying to solve the lack of math fonts at Firefox OS.

Adding Latin Modern Math font

Frรฉdรฉric wrote a patch to add Latin Modern Math font in the list of the fonts shipped at Firefox OS. I apply this patch in my source tree, build Firefox OS and flash Flatfish with my building. Using adb I check that latinmodern-math.woff can be found inside /system/fonts and go to test it. I open this file <font-family-fira.html> that use the system default font and next open this other file <font-family-latinmodern.html> that has an CSS rule to use Latin Modern.

Screenshot of first file (the one using default font).
Screenshot of first file (the one using default font).
Screenshot of second file (the one using Latin Modern font).
Screenshot of second file (the one using Latin Modern font).

If you look the text at the screenshot closely you will note that the font being use is different what imply that the CSS rule is working. The question that remains is "Why Firefox OS don't render the "image" as an grid since this happens at Firefox?".

Screenshot Gallery using Web Fonts

Screenshot using default font.
Screenshot using default font.
Screenshot using Asana font.
Screenshot using Asana font.
Screenshot using Latin Modern font.
Screenshot using Latin Modern font.
Screenshot using STIX font.
Screenshot using STIX font.
Screenshot using Pagella font.
Screenshot using Pagella font.
Screenshot using Termes font.
Screenshot using Termes font.

default

MathML,TCP

MathML,TCP

Tags: