asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
50 stars 45 forks source link

How to change font in stem equations #80

Closed angelog0 closed 3 years ago

angelog0 commented 4 years ago

I wrote a document that uses stem equations and that I compile both with ascidoctor (to produce an HTML file) and asciidoctor-pdf (to produce a PDF file). With asciidoctor-pdf I use the extension asciidoctor-mathematical and mathematical-format=svg.

Now in PDF output the font used for the equations is very poor. I am following this document. There is a section about the font in SVG images but I do not understand how to change the font for stem equations: it reports the example for font in diagram not in stem equations.

In the following archive there are two example, one from an HTM file and one from a PDF file, to proof tha bad quality font in PDF.

font_demo.tar.gz

I would be grateful if you can suggest also a good font for that.

TIA, Angelo.

ProgramFan commented 4 years ago

Unfortunately, there exists no way to change the fonts. The fonts are converted into paths in the generated svgs and the only way to change fonts is to handle them in the library behind mathematical.

bwklein commented 4 years ago

Can we add a scaling factor? My equations seem very 'squished' vertically.

marioortizmanero commented 3 years ago

This seems like a duplicate of #45 and could be closed. There's some interesting info in that issue but it's a bit stale.