Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command-line tool for converting TTF/OTF fonts to SVG

Tags:

Does anyone know of a command-line tool that will convert both TTF and OTF fonts to SVG fonts?

like image 785
David Jones Avatar asked Oct 26 '12 13:10

David Jones


1 Answers

You can use fontforge or batik to do this from the commandline.

With fontforge (see scripting documentation):

#!/usr/bin/fontforge Open($1) Generate($1:r + ".svg") 

Save the above to convert2svgfont.pe file, then invoke as:

convert2svgfont.pe myfont.ttf 

For batik see this documentation, install and then invoke as:

java -jar batik-ttf2svg.jar myfont.ttf -o myfont.svg 
like image 115
Erik Dahlström Avatar answered Dec 04 '22 23:12

Erik Dahlström