#!/usr/bin/env fontforge # # FontForge script that converts its first argument (a font file) to # woff2, saving the results to its second argument (a path). See, # # https://fontforge.org/docs/tutorial/scripting-tutorial.html # # and the additional documentation for Generate() at # # https://fontforge.org/docs/scripting/scripting-alpha.html#Generate # # Specifically: # # fmflags&4 => generate a short "post" table with no glyph name info # in it # # fmflags&8 => do not include ttf instructions # # fmflags&0x8000 => do not generate an FFTM table # # fmflags&0x40000 => do not do flex hints # # fmflags&0x80000 => do not include postscript hints # # And, according to python, # # >>> 0x4 + 0x8 + 0x8000 + 0x40000 + 0x80000 # 819212 # Open($1); Generate($2,"",819212);