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:
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")