# Mathjax fallback: Try SVG before image fonts if HTML-CSS webfont fails

By GDGP

(I am using STIX fonts, but the question is relevant for TeX fonts as well.)

My question: How do I implement the following 1 -> 2 -> 3 fallback chain?

1. HTML-CSS webFont (“STIX-Web”)
2. SVG (“STIX-Web”)
3. Other fallback fonts (local, image, etc)

Note that (1) can fail for various reasons (user has disabled webfonts, or firefox same origin policy gets enforced, etc). Currently, when (1) fails mathjax is falling back to (3).

The fallback needs to work when local fonts in HTML-CSS cannot be used (either because they are explicitly disabled via availableFonts: [] and preferredFont: null, or because the user does not have the fonts locally installed).

Source: Stack Overflow