Skip to content
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

STIX-Web font data for stretchy integral is incorrect #1092

Closed
dpvc opened this issue Mar 13, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@dpvc
Copy link
Member

commented Mar 13, 2015

The integral is marked as a horizontal stretchy character rather than a vertical one, so integrals don't stretch properly for STIX-Web. This affects both HTML-CSS and SVG. The local STIX font doesn't include the integral as stretchy at all (even though it could).

@pkra

This comment has been minimized.

Copy link
Member

commented Mar 13, 2015

(From the User Group posting)

The MathJax fonts don't include the needed characters to make a stretched integral sign, so the integral is not one of the characters that MathJax will stretch. The STIX-Web font does include the needed characters, so you could switch to that font. Unfortunately, there is an error in the data for the stretchy integral in that font, so you would need to include some configuration to fix that. You could put

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  "HTML-CSS": {fonts: ["STIX-Web"]},
  "SVG": {fonts: ["STIX-Web"]}
});
(function () {
  function FixStretchyIntegral(renderer) {
    var FONTDIR = "[MathJax]/jax/output/"+renderer+"/fonts/STIX-Web";
    MathJax.Hub.Register.LoadHook(FONTDIR+"/fontdata.js",function () {
      MathJax.OutputJax[renderer].FONTDATA.DELIMITERS[0x222B].dir = "V"; 
    });
    MathJax.Hub.Register.LoadHook(FONTDIR+"/fontdata-extra.js",function () {
      var FONTDATA = MathJax.OutputJax[renderer].FONTDATA;
      FONTDATA.DELIMITERS[0x222B].dir = "V";
      FONTDATA.DELIMITERS[0x222B].stretch.ext = FONTDATA.DELIMITERS[0x222B].stretch.rep;
    });
  }
  FixStretchyIntegral("HTML-CSS");
  FixStretchyIntegral("SVG");
})();
</script>

in your file just before the script that loads MathJax.js itself. That will correct the data when the font data files are loaded, so that stretchy integrals will stretch properly.

@dpvc dpvc modified the milestones: A future font release, MathJax v2.x.x Apr 17, 2016

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

Davide P. Cervone
Fix stretch data for U+222B (integral) in STIX-Web data for HTML-CSS …
…and SVG, and add it so local STIX data. Resolves issue mathjax#1092.
@dpvc

This comment has been minimized.

Copy link
Member Author

commented Jun 16, 2016

The font-fixes branch of my fork of MathJax fixes this.

@dpvc

This comment has been minimized.

Copy link
Member Author

commented Jul 8, 2016

==> Merged.

@dpvc dpvc added Merged and removed Ready for Review labels Jul 8, 2016

@dpvc dpvc closed this Jul 8, 2016

@dpvc

This comment has been minimized.

Copy link
Member Author

commented Aug 11, 2016

==> In testsuite

MathMLToDisplay/Characters/issue1092.html

@dpvc dpvc added Test Available and removed Test Needed labels Aug 11, 2016

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

@dpvc dpvc added v2.7 Fixed and removed Merged labels Jan 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.