update font version for line mapped format

pull/3/head
Brian Cappello 2017-07-08 21:38:41 -04:00
rodzic 45c247c4df
commit e8fc2dcf54
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -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: