# bold-italic issues on Chrome 32 #735

Closed
opened this issue Feb 10, 2014 · 13 comments

Projects
None yet
3 participants
Member

### pkra commented Feb 10, 2014

 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.

Member

### dpvc commented Feb 12, 2014

 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.
Member

### dpvc commented Feb 12, 2014

 Some browsers have trouble with @font-face rules involving bold and italic, and so MathJax has a feature that causes it to load each font as a separate family (rather than trying to use style and weight on a single family). Using this will allow Chrome 32 to load the bold-italic font properly. So if you add   that will enable that feature when Chrome 32 is used. That should clear up the issue for you.
Member

### dpvc commented Feb 12, 2014

 We can have the HTML-CSS output jax do this automatically.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Feb 12, 2014

 Chrome 32 doesn't load bold-italics properly, so use FontFaceBug to g… 
…et around that. Issue mathjax#735.
 ebdbe6f 

Member

### dpvc commented Feb 14, 2014

 => Merged.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Feb 14, 2014

 Merge branch 'issue735' into develop. Issue mathjax#735. 
 b043b3a 

### smsti commented Apr 19, 2014

 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.
Member

### dpvc commented Apr 21, 2014

 @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.
Member Author

### pkra commented Apr 21, 2014

 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 :(
Member

### dpvc commented Apr 22, 2014

 The patch is tied to version 32 explicitly. Maybe I should do it for version >= 32.

### smsti commented Apr 22, 2014

 To the question asked: I have installed Chrome on Win7 32 bit.
Member Author

### pkra commented Apr 22, 2014

 @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.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Apr 22, 2014

 Make Chrome > 32.0 get bold-italic correctly. Issue mathjax#735. 
 3837d8d 
Member

### dpvc commented Apr 22, 2014

 OK, I've made the check for version > 32 rather than version == 32. See if that helps.
Member Author

### pkra commented Apr 22, 2014

 Quick test using https://rawgithub.com/dpvc/MathJax/3837d8db0e1a31ca752df014f6d7576802860f36/unpacked/MathJax.js worked on Chrome 35beta.
Member

### dpvc commented Apr 22, 2014

 OK, thanks. I'll merge it again.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Apr 22, 2014

 Merge branch 'issue735' into develop. Issue mathjax#735. 
 833b69c 

Closed

Closed

Closed

Open