-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgenerate.pe
executable file
·38 lines (32 loc) · 997 Bytes
/
generate.pe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env fontforge
# $Id: generate.pe 1892 2007-06-18 21:45:40Z eugeniy $
# script file for FontForge for TTF generation
# usage:
# mkdir generated
# chmod +x generate.pe
# ./generate.pe *.sfd
# font generation flags:
# 8 => do not include TT instructions (for experimental typefaces)
# 0x20 => generate a 'PfEd' table and store glyph comments
# 0x40 => generate a 'PfEd' table and store glyph colors
# 0x800 => generate old fashioned kern tables.
# - this one is important because it generates correct kerning tables
def_gen_flags = 0x20 + 0x40 + 0x800
exp_gen_flags = def_gen_flags + 8
if ($version < "20070501")
Error("Your version of FontForge is too old - 20070501 or newer is required");
endif
i = 1
while ( i < $argc )
Open($argv[i], 1)
gen_flags = 0
Select(0x110);
BuildComposit();
Select(0x189);
BuildComposit();
Select(0x1dd);
BuildComposit();
Generate("generated/" + $fontname + ".ttf", "", gen_flags)
i++
Close();
endloop