Fontforge: Export a glyph to SVG with fontforge command line

非 Y 不嫁゛ 提交于 2019-12-04 02:35:26

问题


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.


回答1:


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.

  • Run FontForge (For Windows10 installed in the Program Files (x86) directory, you may need to right-click "run_fontforge.exe" --> Run As Administrator).

  • Open the font you want to export.

  • Go to File > Execute Script

  • Paste: SelectWorthOutputting(); foreach Export("svg"); endloop;
  • Select "FF" radial button.
  • Hit OK

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



来源:https://stackoverflow.com/questions/47902878/fontforge-export-a-glyph-to-svg-with-fontforge-command-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!