Which system font is used as fallback.

6 views
Skip to first unread message

Jens Axel Søgaard

unread,
Dec 20, 2022, 12:13:33 PM12/20/22
to MathJax Users
The section Character fallbacks [1] in the docs is pretty clear until the 
last paragraph that says:

     Finally, when all else fails, MathJax will ask the browser to
     provide the glyph from a system font.

Which system font is used?
[A pointer to the code would be fine]

/Jens Axel Søgaard

[1]
https://docs.mathjax.org/en/latest/output/fonts.html#:~:text=Character%20fallbacks,server%2Dside%20rendering.

Davide Cervone

unread,
Dec 21, 2022, 3:57:27 PM12/21/22
to mathja...@googlegroups.com
The section Character fallbacks [1] in the docs is pretty clear until the 
last paragraph that says:

     Finally, when all else fails, MathJax will ask the browser to
     provide the glyph from a system font.

Which system font is used?

MathJax will insert a unicode character reference for the needed glyph, and will uses the font specified in the output jax's unknownFamily configuration parameter.  The default is "serif", but if the character is not available in the default serif font for your browser, most browsers will look for it in other system fonts, and which one is used depends on the browser and OS.  You can change the unknownFamily configuration to be any list of fonts you want, e.g., include

window.MathJax = {
  chtml: {
    unknownFamily: "Cambria, serif"
  }
};

in your MathJax configuration.  This is for version 3, as that is the documentation you have cited.

See the documentation at


for more.

Davide
Reply all
Reply to author
Forward
0 new messages