result += "\toffset %.3f %.3f;\n"%(float(ox)/fh, float(oy)/fh)
result += "\tadvance %.3f;\n"%(float(a)/fh)
result += "};\n"
+ elif parts[0]=="kern":
+ l, r, d = map(int, parts[1:])
+ result += "kerning %d %d %.3f;\n"%(l, r, float(d)/fh)
return result
raise Exception("Could not execute ttf2png")
result = "texture\n{\n"
- result += "wrap CLAMP_TO_EDGE;\n"
- result += maketex.make_tex("makefont-tmp.png")
+ result += maketex.make_tex("makefont-tmp.png", wrap="CLAMP_TO_EDGE")
result += "};\n"
result += convert_def("makefont-tmp.def")