]> git.tdb.fi Git - libs/gl.git/blobdiff - scripts/makefont.py
Sort the cap_height and x_height arrays in makefont.py
[libs/gl.git] / scripts / makefont.py
index 1d7a4332906a55e02dc0df2f8009648b4ee6408b..d24732ee33ea0d5bd05fd2a417c254a182fa5506 100755 (executable)
@@ -40,8 +40,10 @@ def convert_def(fn):
                        result += "kerning %d %d %.3f;\n"%(l, r, float(d)/fh)
 
        if cap_height:
+               cap_height.sort()
                header += "cap_height %.3f;\n"%(float(cap_height[len(cap_height)*2/3])/fh)
        if x_height:
+               x_height.sort()
                header += "x_height %.3f;\n"%(float(x_height[len(x_height)*2/3])/fh)
 
        return header+result