svgfontforge

Fontforge: Export a glyph to SVG with fontforge command line


How to export a glyph (from its unicode) to SVG with Fontforge command line ?

I also need to specify the font size and keep the original margins it has in the font.


Solution

  • You may have found your answer already, but I just had to do this with the latest build of FontForge. The old answer of this command:

    fontforge -lang=ff -c 'Open($1); SelectWorthOutputting(); foreach Export("svg"); endloop;' font.ttf 
    

    From a command prompt didn't want to work on Windows10 (I assume a permission issue), but you could give it a try. A quick work-around is to do it via the GUI Execute Script.

    It'll save to the FontForge folder (where run_fontforge.exe is located).