New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bold-italic issues on Chrome 32 #735
Comments
The problem appears to be a bug in Chrome 32. When a bold or italic font is requested, if that weight or style is not available, the browser may generate the bold or italic version algorithmically from the normal version of the font. In the case of a web font, that may be replaced by the actual font when it arrives. But the sizes of the characters in the actual bold or italic version of the font may not correspond to the algorithmic one, so MathJax needs to be able to recognize the difference between the faked font and the real one. To to this, MathJax's web fonts include special characters that allow MathJax to recognize the true bold or italic font as different from one generated algorithmically from the standard font. It uses these to wait for the real font to arrive rather than trying to use the algorithmic one. What seems to be happening in Chrome 32 is this: MathJax requests the MathJax_Math-bold-italic, but Chrome uses MathJax_Math-italic to construct a bold form that is uses instead. MathJax recognizes that this is not the correct font and waits for the true one to arrive. What is supposed to happen is that the browser goes on to load the true font while MathJax is waiting, and then MathJax will detect it when it does. But what actually seems to happen is that Chrome doesn't make the font available until MathJax has given up waiting for it. MathJax waits for 15 seconds for the font, and then gives up. I can see that the font hasn't changed during those 15 seconds, and as soon as MathJax times out, the font is replaced, so something is wrong about Chrome's handling of the font or the screen refresh, or something related to that. They seem to have resolved the problem in Chrome 33, according to Peter (I haven't upgraded to see). I will post some possible work-arounds shortly. |
Some browsers have trouble with
that will enable that feature when Chrome 32 is used. That should clear up the issue for you. |
We can have the HTML-CSS output jax do this automatically. |
…et around that. Issue mathjax#735.
=> Merged. |
I have upgraded Chrome to version 34 and the issue with bold fonts still remains. The above lines with javascript were helpful to fix that. |
@smsti, I am using Chrome 34 on Mac OS X and the bold issue does not occur. What OS are you using? I believe Peter is using Linux. |
I don't have Chrome 34 but I do see the problem on Chrome 35 beta -- with both 2.3 and on the develop branch :( |
The patch is tied to version 32 explicitly. Maybe I should do it for version >= 32. |
To the question asked: I have installed Chrome on Win7 32 bit. |
@dpvc that might be worth our while. On the bright side, Chrome seems to move towards the new CSS font loading API so maybe we can use that sooner than expected. |
OK, I've made the check for version > 32 rather than version == 32. See if that helps. |
Quick test using https://rawgithub.com/dpvc/MathJax/3837d8db0e1a31ca752df014f6d7576802860f36/unpacked/MathJax.js |
OK, thanks. I'll merge it again. |
From a report on the User Group, there is an issue with the bold-italic TeX fonts.
Minimal example would be:
\(\boldsymbol{x}\)
, say on http://cdn.mathjax.org/mathjax/latest/test/sample-dynamic-2.html. Note that this is Chrome 32 specific -- Chrome 33 has no issue.This might be a duplicate of #716.
Since Chrome 33 works fine, this might be a won't-fix.
The text was updated successfully, but these errors were encountered: