shrhdk / text-to-svg

Convert text to SVG path without native dependence.
Other
974 stars 131 forks source link

Most fonts are getting cut-off even when using anchor option #56

Open jkhaui opened 4 years ago

jkhaui commented 4 years ago

Hi,

Thanks for the great library. I am using text-to-svg in conjunction with ~50 handwritten fonts and I notice the majority of them are prematurely trimmed on the x-axis (i.e. the first and last characters are cut in half).

A hacky workaround I'm using is to append 2 empty spaces to the start and 2 empty spaces to the end of the text before converting. It works, but obviously a proper solution would be something like the ability to add padding to the canvas drawing before conversion

scottw-finao commented 1 month ago

I had similar results when trying it. Is there a parameter to adjust the bounding box?