scripts/fontexport.pe
raw| 1 | # FontForge script to export font file(s) in selectable format |
| 2 | # TODO: 0x800 fmflags only for TTF? |
| 3 | |
| 4 | if ($argc <= 1) |
| 5 | Print("usage: script [-<format>] file1 ...") |
| 6 | Print("(default format is ttf)") |
| 7 | return(1) |
| 8 | endif |
| 9 | |
| 10 | format = "ttf" |
| 11 | if (Strstr($1, "-") == 0) |
| 12 | format = Strsub($1, 1) |
| 13 | shift |
| 14 | endif |
| 15 | while ($argc > 1) |
| 16 | Print("Generating " + format + " from " + $1) |
| 17 | Open($1) |
| 18 | Generate($1:r + "." + format, "", 0x800) |
| 19 | Close() |
| 20 | shift |
| 21 | endloop |