X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=scripts%2Fmakefont.py;h=aab4e19da83b6074f9f3430148dee0673c54eade;hb=e23fecdc48dc34a61b05296f101bff13fbf9be7d;hp=aa6aa8393a6b0e30b4695c6075a4b6f75ae308c7;hpb=e0e6d12dc7f55a1033e6939dcccdc04e4b469692;p=libs%2Fgl.git diff --git a/scripts/makefont.py b/scripts/makefont.py index aa6aa839..aab4e19d 100755 --- a/scripts/makefont.py +++ b/scripts/makefont.py @@ -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")