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
Closed

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

dpvc opened this issue Mar 13, 2015 · 4 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7

Comments

@dpvc
Copy link
Member

dpvc 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).

@dpvc dpvc added Ready for Development Accepted Issue has been reproduced by MathJax team labels Mar 13, 2015
@dpvc dpvc added this to the A future font release milestone Mar 13, 2015
@pkra
Copy link
Contributor

pkra 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 added a commit to dpvc/MathJax that referenced this issue Jun 16, 2016
…and SVG, and add it so local STIX data. Resolves issue mathjax#1092.
@dpvc
Copy link
Member Author

dpvc commented Jun 16, 2016

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

@dpvc
Copy link
Member Author

dpvc commented Jul 8, 2016

==> Merged.

@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Jul 8, 2016
@dpvc dpvc closed this as completed Jul 8, 2016
@dpvc
Copy link
Member Author

dpvc commented Aug 11, 2016

==> In testsuite

MathMLToDisplay/Characters/issue1092.html

dpvc added a commit to mathjax/MathJax-test that referenced this issue Aug 11, 2016
@dpvc dpvc added v2.7 Fixed and removed Merged Merged into develop branch labels Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7
Projects
None yet
Development

No branches or pull requests

2 participants