tkrkt / text2png

text-to-png generator for Node.js
MIT License
188 stars 50 forks source link

Line height in EMs #13

Open bashaus opened 6 years ago

bashaus commented 6 years ago

We're having some problems with this library when using text that is all in uppercase, letters which uses non-English characters (e.g.: À, A, Â, Ä, etc.). Can we measure line height in EMs instead of the actual height - and then use lineSpacing when needed?

tkrkt commented 6 years ago

That's a good idea!

Since drawing needs to calculate the distance from the baseline, the options will require acsent and desent instead of lineHeight. ss