Closed dac514 closed 5 years ago
STIX-Web font has trouble rendering LaTeX in PDF format and winds up turning a lot of characters into question marks.
StixLaTeXOnly.pdf
I posted a question in the PrinceXML forums about the STIX-Web font troubles. Hopefully someone from over there can help explain this.
https://www.princexml.com/forum/topic/4183/mathjax-svg-files-as-img-tags-can-anyone-help-me-with-css
I've been running tests and this may be the issue:
https://github.com/mathjax/MathJax/issues/2035
Ie.
SVG - Unknown character: U+1D461 in STIXMathJax_Main-bold-italic,STIXMathJax_Normal-bold-italic,STIXMathJax_Script-bold-italic,STIXMathJax_DoubleStruck-bold-italic,STIXMathJax_SansSerif-bold-italic,STIXMathJax_Latin-bold-italic,STIXMathJax_Alphabets-bold-italic,STIXMathJax_Marks-bold-italic,STIXMathJax_Shapes-bold-italic,STIXMathJax_Misc-bold-italic,STIXMathJax_Variants-bold-italic,STIXMathJax_Size1
I've been running tests and this may be the issue:
Just FYI "unknown character" means that MathJax did not find a path matching the unicode point (i.e., didn't find a glyph in the original font); in those cases it falls back to an SVG text element with Unicode in it (which is not ideal since fons won't match); this may very well be a problem for Prince but it's fairly normal for SVGs to have <text>
elements.
it's fairly normal for SVGs to have \<text> elements
Thanks @pkra. The SVG's with text nodes render fine in the browser:
As I type, the problem can be split into 3 distinct issues:
(and goes away with either https://github.com/mathjax/MathJax/issues/2035 patch:)
PS: Here's the text case:
\boldsymbol{\Delta{p}_1=F_1\Delta{t},}
Add
&font=X
param to URL. Let the user change the font to use for rendering the mathematics. The default is:font: "TeX"
The possible values are TeX, STIX-Web, Asana-Math, Neo-Euler, Gyre-Pagella, Gyre-Termes and Latin-Modern. Note that not all mathematical characters are available in all fonts (e.g., Neo-Euler does not include italic characters), so some mathematics may work better in some fonts than in others. The STIX-Web font is the most complete.
Source: http://docs.mathjax.org/en/latest/options/output-processors/SVG.html#configure-svg