FontForge: Export a font's individual glyphs into svg files in batch?
Asked Answered
A

2

7

Is it possible to batch export individual glyphs from a font to SVG without having to export them manually one by one?

Related (but the other way around): Import a sequence of .svg files into FontForge as glyphs and output a font file

Attorn answered 17/5, 2019 at 4:36 Comment(0)
M
8

Open the font you want to export.

  • Go to File > Execute Script
  • Paste: SelectWorthOutputting(); foreach Export("svg"); endloop;
  • Select "FF" radial button.
  • Hit OK

Also works on the latest Mac version running on Mojave. The font files are saved in you user directory ~./.

Md answered 6/9, 2019 at 12:39 Comment(5)
Just for the remark: See also this answer, essentially the same for a different question.Seedy
I'm getting a "save failed" error when running this script. Any solution?Romona
@Romona make sure you have the font open and loaded. Also, make sure you have the text in correctly, with the correct separators.Md
@PeterSuwara Yes, fonts are open and loaded. In fact, I tried with some popular Google Fonts. Getting the same error! Not sure what's causing this. Is there any way to choose a specific save location while running this script? Thanks for the reply.Romona
You need to run the executable as adminPower
S
1

I had the same "save failed" error when I first ran the above script. To resolve this problem on Windows 10, I ran FontForge as an Administrator and it ran perfectly fine. All the .svg files will be saved in the same directory where you installed FontForge (e.g. C:\Program Files (x86)\FontForgeBuilds). See https://fontforge.org/docs/scripting/scripting-alpha.html#Export for documentation on what files are supported when exporting.

Stutman answered 7/3, 2021 at 0:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.