hfmath is a tiny JS library that renders LaTeX math with single-line Hershey Fonts.
This demo below is running client-side in you browser, but you can also conveniently use `https://hfmath.glitch.me/x^2+2x+1` to obtain an SVG rendered on Glitch server, for embedding on your websites (<img src="...). URL escape codes are sometimes necessary, e.g. the backslash is "%5C".
Type LaTeX below:
Grab output format of your choice:
SVG | <path d="... | Polylines |
hfmath supports more features and options not present in this simple demo. Check out the source hosted on GitHub!