]> git.tdb.fi Git - libs/gl.git/blobdiff - scripts/makefont.py
Remove deprecated things from the maketex script
[libs/gl.git] / scripts / makefont.py
index aa6aa8393a6b0e30b4695c6075a4b6f75ae308c7..aab4e19da83b6074f9f3430148dee0673c54eade 100755 (executable)
@@ -71,8 +71,9 @@ def make_font(fn, size, ch_ranges, autohinter, margin, padding, distfield):
        import os
 
        cmd = "ttf2png \"{}\" -o makefont-tmp.png -d makefont-tmp.def -t -p -s {} -m {} -n {} -g".format(fn, size, margin, padding)
-       for r in ch_ranges:
-               cmd += " -r {},{}".format(*r)
+       if ch_ranges:
+               for r in ch_ranges:
+                       cmd += " -r {},{}".format(*r)
        if autohinter:
                cmd += " -a"
        if distfield:
@@ -81,7 +82,7 @@ def make_font(fn, size, ch_ranges, autohinter, margin, padding, distfield):
                raise Exception("Could not execute ttf2png")
 
        result = "texture\n{\n"
-       result += maketex.make_tex("makefont-tmp.png", wrap="CLAMP_TO_EDGE")
+       result += maketex.make_tex("makefont-tmp.png")
        result += "};\n"
        result += convert_def("makefont-tmp.def")