domenic / svg2png

Converts SVGs to PNGs, using PhantomJS
Other
585 stars 134 forks source link

Bad result in small font rendering #84

Open sokraflex opened 7 years ago

sokraflex commented 7 years ago

Hey people!

I'm experiencing bad results when rendering small fonts.

SVG:

svg2png-fontrendering-svg

PNG result:

svg2png-fontrendering-png

SVG original: 6239.zip

I'm using the font "Raleway", which is locally installed and can be found here: https://fonts.google.com/specimen/Raleway

On one hand, of course, the font size is not ideal - but due to other restrictions, I cannot make it larger. Also, it first seems that the text only appears "bolder", but when looking at the 2nd x-axis-label "Munich", one sees that the "c" is not even on the same baseline as the other characters? This behaviour also appears with dates written that way, and the y-axis shows that it is not related to the font-angle.

So far, I've been using inkscape, but due to 100 % CPU usage upon fontcache building that is no option anymore. Apart from the font-rendering, the results with PhantomJS are way better.

Does anyone have an idea on what could cause this rendering problem? Any hints on how I may be able to fix it, or suggestions for a workaround?

Best greetings,

SargTeX

/EDIT: I'm on Windows 10 (64-bit), have not tested it so far on Linux, but with different SVGs, all resulting in a similar experience.