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

    

Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273