]> gitweb.michael.orlitzky.com - charm-bypass.git/blob - sfd2woff.ff
index.html.in: fix typos in the origin/destination => zone map
[charm-bypass.git] / sfd2woff.ff
1 #!/usr/bin/env fontforge
2 #
3 # FontForge script to convert its argument (some font file) to
4 # woff2. The base name of the file is kept the same and a .woff2
5 # extension is added. See,
6 #
7 # https://fontforge.org/docs/tutorial/scripting-tutorial.html
8 #
9 # and the additional documentation for Generate() at
10 #
11 # https://fontforge.org/docs/scripting/scripting-alpha.html#Generate
12 #
13 # Specifically:
14 #
15 # fmflags&4 => generate a short "post" table with no glyph name info
16 # in it
17 #
18 # fmflags&8 => do not include ttf instructions
19 #
20 # fmflags&0x8000 => do not generate an FFTM table
21 #
22 # fmflags&0x40000 => do not do flex hints
23 #
24 # fmflags&0x80000 => do not include postscript hints
25 #
26 # And, according to python,
27 #
28 # >>> 0x4 + 0x8 + 0x8000 + 0x40000 + 0x80000
29 # 819212
30 #
31 Open($1);
32 Generate($1:r + ".woff2","",819212);