Skip to content

Commit

Permalink
Roundtrip the almost final fonts through ttx
Browse files Browse the repository at this point in the history
Use ttx to go from ttf to xml (.ttx) and back to ttf.
This reduces the size of the font.
  • Loading branch information
devosb committed Nov 16, 2016
1 parent c02d26c commit e06c891
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -83,4 +86,4 @@ for f in ['', 'bold', 'book', 'bookbold'] :

def configure(ctx) :
ctx.find_program('ttfautohint')

ctx.find_program('ttx')

0 comments on commit e06c891

Please sign in to comment.