diff --git a/font_to_py.py b/font_to_py.py index 9b2449b..379efc3 100755 --- a/font_to_py.py +++ b/font_to_py.py @@ -502,12 +502,12 @@ class Font(dict): HEADER = """# Code generated by font-to-py.py. # Font: %(font)s -version = '0.2' +version = '%(version)s' """ HEADER_CHARSET = """# Code generated by font-to-py.py. # Font: %(font)s -version = '0.2' +version = '%(version)s' CHARSET = %(charset)s """ @@ -580,7 +580,8 @@ def write_data(stream, fnt, font_path, monospaced, hmap, lmap, reverse, charset) sequential_charset = not bool(len([x for x in range(len(charset) - 1) if ord(charset[x]) + 1 != ord(charset[x+1])])) header_data = {'font': os.path.split(font_path)[1], - 'charset': {ch: i for i, ch in enumerate(charset)}} + 'charset': {ch: i for i, ch in enumerate(charset)}, + 'version': '0.3' if lmap else '0.2'} if sequential_charset: stream.write(HEADER % header_data) else: