'Save font'

def save(self, filename):

    self.compile()
    self.bitmap.save((os.path.splitext(filename)[0] + '.pbm'), 'PNG')
    with open((os.path.splitext(filename)[0] + '.pil'), 'wb') as fp:
        fp.write('PILfont\n')
        fp.write((';;;;;;%d;\n' % self.ysize).encode('ascii'))
        fp.write('DATA\n')
        for id in range(256):
            m = self.metrics[id]
            if (not m):
                puti16(fp, ([0] * 10))
            else:
                puti16(fp, ((m[0] + m[1]) + m[2]))
