# Slow processing, different look to math processing, problem with fonts. Is it me, or is it the site?

My Firefox upgraded this morning to version 3.6.13, and I've noticed a number of striking differences; I'm wondering if it is me, or if the site has somehow also changed coincidentally at the same time.

This morning, I've been having some trouble with very slow processing of math text (text within dollar signs), taking up to a minute to occur, and the look of the math text has changed considerably from the way it looked yesterday. (Added: I note that the math fonts in MathOverflow still look the same as they did yesterday). Added: When processing after a reload or hard-refresh, it ends saying in a little box on the bottom left "can't load web font TeX/Math/Italic".

Here's a screen shot:

It seems that Firefox is unable to load the math fonts for some reason; the messages flash too quickly to catch all, but I just did a screenshot that captures the last one. it's in the bottom left corner of the webpage:

The displayed equation looks different from what equations have looked up to now, and the way they look on MathOverflow; e.g.,

I'm running on Ubuntu 10.04.

UPDATE: I followed the link to the MathJax page for font help, downloaded the STIX fonts and installed them locally. That seems to have solved both the time and the display problems. So it seems clear that the problem was that somehow I was not able to load the web-based fonts.

UPDATE 12/12.2010: It seems that the MathJax folks have fixed the problem on their end. I uninstalled the local fonts in my Windows machine and everything seems to work fine now; I'll try it in my Ubuntu machine tomorrow.

• It's an annoying thing to say, but someone's got to say it: Have you tried doing a hard refresh? – Rahul Dec 10 '10 at 18:37
• @Rahul Narain: Well, I have no cache; and yes, I have. It just re-starts the process. It's not that it is not rendering, it's rendering very slowly, and it's rendering differently from the way it did yesterday and from the way MathOverflow renders. And I just noticed that it says that it "can't load web font TeX/Math/Italic". – Arturo Magidin Dec 10 '10 at 19:05
• Could you take a screenshot of what the site now looks like in Firefox 3.6.13? Also, what OS are you on? – J. M. is a poor mathematician Dec 10 '10 at 19:11
• The second thing with the user page tags was mentioned on Meta.SO and is supposedly fixed in code and just waiting for a deployment cycle. – Isaac Dec 10 '10 at 19:16
• @Isaac: Ah, thanks. I'll remove that from my post, then. – Arturo Magidin Dec 10 '10 at 19:20
• @Arturo, can you check the memory usage of FF at the time of slow performance? I have performance issues with FF when I leave it on for a long time. FF is known to have memory-hog issues. Sometimes(on Windows) my FF can eat up to almost 1gig of ram. – Jin Dec 10 '10 at 19:25
• @Arturo: if you right click on the math texts, and switch from HTML-CSS to MathML rendering (under Settings -> Math Renderer), is it any better? – Willie Wong Dec 10 '10 at 19:37
• @Jim: Right now, while doing no processing, it lists memory use as 76 KiB for firefox and about 141 MiB for firefox-bin. I went back to the regular page and did a hard refresh, and the usage for firefox stayed the same, for firefox-bin about 141 MiB. I think the problem is with loading the fonts; it seems to be saying it is unable to load the fonts. I'm adding a screenshot with the error message (it's small, on the bottom left). – Arturo Magidin Dec 10 '10 at 19:39
• @Willie Wong: It's better as far as time (does it almost instantaneously, as it did before), and it displays exactly the way it's displaying now (which is different from the way it does in MathOverflow and the way it was yesterday). – Arturo Magidin Dec 10 '10 at 19:41
• @Arturo I am also using Ubuntu 10.04, and did the recent update to Firefox (3.6.13). I just checked, and I have the exact same problem. I did not notice because I recently started using Chrome, and there is still no problem there. – yasmar Dec 11 '10 at 0:52
• @Arturo: thanks to you being my canary, at least I know now to hold off upgrading Firefox for a while. – Willie Wong Dec 12 '10 at 1:16
• @Willie Wong: Well, my windows laptop updated Firefox today, and sure enough I ran into the same trouble. Installing the fonts locally solved it here as well, though. – Arturo Magidin Dec 12 '10 at 3:36
• FWIW, I disable automatic updating for Firefox and wait a few weeks before upgrading, while waiting for reports like these... :D so yes, Arturo, thank you, too! – J. M. is a poor mathematician Dec 12 '10 at 13:48

UPDATE:

New OTF font files have been downloaded and applied to all installations where MathJax is used. If you are still having trouble clear your browser cache.

Davide and Sean were able to update the MathJax fonts, and we just posted an update at mathjax.org. See http://www.mathjax.org/download.

Davide also updates the fonts.zip file in our github repo and in the SourceForge SVN rep. The only difference is the updates for Firefox, so if you get the above patch file, you don't need to download the whole fonts.zip.

It appears that members of the MathJax team are aware of this and are working on a fix.

https://github.com/mathjax/MathJax/issues#issue/22/comment/601772

OK, I've looked into it, and it seems this is not going to be easy to fix (it is going to take more exploring than I have time for at the moment). On the other had, I do have an interim solution: it seems that FF is unhappy with the OTF versions of the fonts, but it is able to load TTF versions. We don't currently have them in the fonts distribution, but I do make them (as part of the creation of EOT versions), and these do seem to work with FF4.0b as well as 3.6.13. It is a straightforward change to include the TTF versions and have FF use them for v3.6.13 and above. (Do we know that this is the version where it came into play?) So there is at least a solution. I will still work on figuring out what is wrong with the fonts and how to fix it, but I'm not really a font expert, and it takes me a while to work through it.

UPDATE:

From: robertminer

The current plan is to put out a workaround that uses ttf fonts in the affected versions of Firefox hopefully tomorrow, Saturday, Dec 11 for folks like gdalgas for whom the problem is mission critical. That will likely be in the form of a couple line patch to a JavaScript file, along with the necessary ttf fonts which will have to be deployed along with the existing .otf fonts

I believe the problem stems from the following line in the security advisory for Firefox 3.6.13:

MFSA 2010-78 Add support for OTS font sanitizer

The OTS font sanitizer is extremely paranoid and rejects AMS-Regular.otf because it's too big or something. There is a highly not recommended workaround:

1. Open about:config in the adress bar in Firefox.
2. Set gfx.downloadable_fonts.sanitize to false.
• Hopefully some genius writes a Firefox add-on that allows the sanitizer to be selective... – J. M. is a poor mathematician Dec 11 '10 at 3:42
• I also faced the the same issue and followed this workaround,but why is this highly not recommended? – Quixotic Dec 11 '10 at 9:59
• For security reasons, obviously. The OTS font sanitizer is supposed to decline the loading of fonts that it deems "unsafe". Paranoia when loading data from an untrusted source (which webservers are) is a good thing. But that doesn't exclude the possibility that the sanitizer is a bit too zealous – kahen Dec 11 '10 at 10:04
• @Deb: Would you accept gifts from complete strangers? – J. M. is a poor mathematician Dec 11 '10 at 10:18
• Nopes :P But any other fixes? – Quixotic Dec 11 '10 at 12:27

I just upgraded my Firefox from 3.6.12 to 3.6.13(Mac OSX 10.5.8). I'm able to reproduce the problem.

It seems it takes FF forever to load the math font.

But eventually the font does get loaded.

However I noticed the font is now a sans-serif type. Where as before, and currently in other browerser it is(and should be) a serif type.

I'll look into this. I suspect this isn't an isolated issue with Math.SE. Seems like a FF 3.6.13 issue. I wonder if other sites that use mathjax are affected as well?

• Well, glad it's not just me. With me, I don't know if the fonts actually got loaded, since I always seemed to end up with an error message for the last one, and there seemed to be a flashing message between load attempts that could have been a "Can't load" legend. I think the fonts did not get loaded and it defaulted to image fonts instead, hence the different look. – Arturo Magidin Dec 10 '10 at 20:18
• After some googling, it appears this is a known issue with FF 4.0 beta. see: github.com/mathjax/MathJax/issues#issue/22 – Jin Dec 10 '10 at 20:23