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

The fontforge recipe given previously by @Erik no longer works - fontforge has switched to Python scripting.

Here's how I converted a font from PFA to SVG on the command line - this will also work fine for TTF, etc.:

fontforge -c 'import fontforge;fontforge.open("/usr/share/fonts/X11/Type1/NachlieliCLM-Bold.pfa").generate("NachlieliCLM-Bold.svg")'

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