X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=makefont.py;h=e0b587938a5b80a85187a5e21c75a5c6f364df6e;hp=c61c1d5ad7fd9573f0ae5d53e30e06d06a59257c;hb=f14435e58bfa0fa697a06ba9a454bb30cd37d9d8;hpb=c112952f156b4ccb820568bca1fd1c59966f708e diff --git a/makefont.py b/makefont.py index c61c1d5a..e0b58793 100755 --- a/makefont.py +++ b/makefont.py @@ -1,14 +1,12 @@ #!/usr/bin/python -# $Id$ - def convert_def(fn): src=file(fn) line=src.readline() tw,th,fh,fa,fd=map(int, line.split()) - result="default_size %d;\n"%fh + result="native_size %d;\n"%fh result+="ascent %.3f;\n"%(float(fa)/fh) result+="descent %.3f;\n"%(float(fd)/fh) @@ -30,7 +28,8 @@ def make_font(fn, size): if os.system("ttf2png \"%s\" -o makefont-tmp.png -d makefont-tmp.def -t -p -s %d"%(fn, size)): raise Exception("Could not execute ttf2png") - result="texture_inline\n{\n" + result="texture\n{\n" + result+="wrap CLAMP_TO_EDGE;\n" result+=maketex.make_tex("makefont-tmp.png") result+="};\n" result+=convert_def("makefont-tmp.def")