From e06c8911178df3dad5304dd7fdfe26265c883594 Mon Sep 17 00:00:00 2001 From: Bobby de Vos Date: Tue, 15 Nov 2016 22:40:15 -0700 Subject: [PATCH] Roundtrip the almost final fonts through ttx Use ttx to go from ttf to xml (.ttx) and back to ttf. This reduces the size of the font. --- wscript | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wscript b/wscript index db26b95e..8e4423de 100644 --- a/wscript +++ b/wscript @@ -52,10 +52,13 @@ ftmlTest('bin/ftml.xsl') for f in ['', 'bold', 'book', 'bookbold'] : fsf = 'font-source/padauk' + f + target = namestrings[f][0].replace(' ', '') + '-' + namestrings[f][1].replace(' ', '') - fnt = font(target = process(namestrings[f][0].replace(' ', '') + '-' + namestrings[f][1].replace(' ', '') + '.ttf', + fnt = font(target = process(target + '.ttf', name(namestrings[f][0], lang='en-US', subfamily = namestrings[f][1]), - cmd('${TTFAUTOHINT} -n -W ${DEP} ${TGT}')), + cmd('${TTFAUTOHINT} -n -W ${DEP} ${TGT}'), + cmd('${TTX} -f -o ' + target + '.ttx' + ' ${DEP}; ${TTX} -f -o ${TGT} ' + target + '.ttx') + ), version = TTF_VERSION, # license = ofl("Padauk"), copyright = COPYRIGHT, @@ -83,4 +86,4 @@ for f in ['', 'bold', 'book', 'bookbold'] : def configure(ctx) : ctx.find_program('ttfautohint') - + ctx.find_program('ttx')