+ x_height.sort()
+ result += "x_height %.3f;\n"%(float(x_height[len(x_height)*2/3])/fh)
+
+ for c, n in codes.iteritems():
+ _, _, ox, oy, a = metrics[n]
+ x, y, w, h, b = glyphs[n]
+ result += "glyph %d\n{\n"%c
+ result += "\ttexcoords %f %f %f %f;\n"%(float(x)/tw, float(th-y-h)/th, float(x+w)/tw, float(th-y)/th)
+ result += "\tsize %.3f %.3f;\n"%(float(w)/fh, float(h)/fh)
+ result += "\toffset %.3f %.3f;\n"%(float(ox-b)/fh, float(oy-b)/fh)
+ result += "\tadvance %.3f;\n"%(float(a)/fh)
+ result += "};\n"
+
+ for k in kerning:
+ l, r, d = k
+ result += "kerning %d %d %.3f;\n"%(l, r, float(d)/fh)