# Remap | in STIX font data [was: "Bad alignement of \vert"] #1154

Closed
opened this issue Apr 8, 2015 · 14 comments

Projects
None yet
3 participants

### ergever commented Apr 8, 2015 • edited by dpvc

 When typing $\vert x \vert$ the vertical line is align to the baseline and according to TeX this should be lower. See an example here: http://jsfiddle.net/AqDCA/541/
Member

### pkra commented Apr 8, 2015

 Hm. I'm not seeing anything unusual in that sample (i.e., it matches TeX behavior for me). Can you share a screenshot and more details on your system (browser, OS versions etc.).

Author

### ergever commented Apr 8, 2015

 Sorry, I didn't test other browser: on ubuntu 14.04 with firefox 37.0.1 -> bad align: on ubuntu 14.04 with chromium 41.0.2272.76 -> bad align: windows 7 with IE11 or chrome 41.0.2272.118 or firefox 31.5.0 -> OK: This is with the latest MathJax from github and the default.js configuration. Thanks you for your interest in this bug.
Author

### ergever commented Apr 8, 2015

 By installing on ubuntu the packages fonts-mathjax* the correct font for | is used and the behavior is as expected. I thought that MathJay download automatically the woff fonts as needed but it's apparently not the case! However, with STIX fonts, the behavior is still uncorrect on ubuntu.

Member

### pkra commented Apr 8, 2015

 re-opening since this is definitely a bug. Can you tell us which version of the STIX fonts you have installed on your system?
Member

### dpvc commented Apr 8, 2015

 The vertical line character "|" in the STIX fonts doesn't descend below the baseline, so when the STIX fonts are used, absolute values look like the ones in your first two images. The third one shows the MathJax web font, in which the vertical line does extend below the baseline. You have the STIX fonts installed locally on your Ubuntu machine, but not on the Windows machine, which accounts for the difference in font choice. MathJax will use the locally installed STIX fonts in preference to the web fonts (for performance reasons), unless you change the configuration to prevent that. On the other hand, it will use locally installed MathJax fonts in preference to local STIX fonts, which is why it changed when you installed the MathJax fonts locally. MathJax only uses web-based fonts if you don't have either MathJax or STIX fonts installed locally. See the discussion on the MathJax User's Forum for a work-around if you are managing your own pages.
Member

### dpvc commented Apr 8, 2015

 @pkra, I'm not sure I'd call it "definitely" a bug, as whether the vertical line descends below the baseline is a font-design decision. There is nothing that says absolute values must look like they do in the TeX fonts (though I do prefer it that way myself).
Member

### pkra commented Apr 8, 2015

 @dpvc yes, sorry. I should've written "I want to understand what's going on" -- thanks for clarifying.

Member

### dpvc commented Apr 8, 2015

 We can think about whether we should make the remapping indicated in the link I gave above be the default (if the character is used in an ). I'm not sure.
Author

### ergever commented Apr 8, 2015 • edited by dpvc

 OK thank you for the explanation and the workaround, now I understand what's going on. The vertical bar of the STIX fonts is definitely buggy: in a pdf generated by LaTeX this is the \big version of \vert which is a bug! But that's another story.
Member

### pkra commented Apr 8, 2015

 @dpvc we could record it but we should probably wait for STIX 2.0 to come out

Member

### pkra commented May 7, 2015

 renamed and added to font milestone.

### dpvc pushed a commit to dpvc/MathJax that referenced this issue Jun 16, 2016

 Remap U+007C to variant form, and vice-versa. Resolves issue mathjax#… 
…1154
 913dcb5 
Member

### dpvc commented Jun 16, 2016

 The font-fixes branch of my fork of MathJax includes a patch that swaps the variant form (which has a descender) and the normal form (which doesn't).

Merged

Member

### dpvc commented Jul 8, 2016

 ==> Merged.

### dpvc pushed a commit to mathjax/MathJax-test that referenced this issue Aug 11, 2016

 Add test for mathjax/MathJax#1154 
 eb462c2 
Member

### dpvc commented Aug 11, 2016

 ==> In testsuite MathMLToDisplay/Characters/issue1154.html