How to convert text to SVG paths?

后端 未结 6 1884
孤街浪徒
孤街浪徒 2020-11-29 17:52

I have a font in ttf file and want to generate SVG with text turned into paths. I don\'t need image (so using imagettftext or Image Magick font rendering capabilities is not

6条回答
  •  我在风中等你
    2020-11-29 18:49

    If you can get an svgfont out then you have all the information there to render it using the glyph paths (copy-paste all the glyph path data you need to any number of path elements and apply a flip-y transform and scale it to whatever size you need). Batik has a tool called ttf2svg, which gives you svgfont output. There are others as well, fontforge for example.

    Not sure if there are any pure command-line tools out there that can generate an svg like this directly, but the Inkscape solution should do exactly what you want.

提交回复
热议问题