mathjax / MathJax-node

MathJax for Node
Apache License 2.0
616 stars 97 forks source link

width of svg is too small #473

Closed symlons closed 3 years ago

symlons commented 3 years ago

the width of the generated SVG is sometimes too small eg. in the combination of the characters it is particularly noticeable with the combination sdf:

Screen Shot 2021-07-20 at 4 51 44 PM
dpvc commented 3 years ago

If you are viewing this in a browser, because the width and height are given in ex units, at some zoom levels the rounding of those dimension to actual pixel values sometimes can cause the size to be too small. Does the effect change if you zoom to different sizes? (I see this effect in Firefox only at certain zoom levels.)

One option would be to add style="overflow: visible" to the SVG element itself, as that will allow the full character to be displayed even if the box size isn't quite right.

You may also consider using MathJax v3 rather than mathjax-node, which is based on version 2. Version 3 can be run in node directly, rather than needing the rather fragile framework used in mathjax-node.

symlons commented 3 years ago

Thanks for the tip! setting overflow to visibile improved the situation in Chrome but in Safari the issue is still noticeable.