kopia lustrzana https://github.com/peterhinch/micropython-font-to-py
update font version for line mapped format
rodzic
45c247c4df
commit
e8fc2dcf54
|
@ -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:
|
||||
|
|
Ładowanie…
Reference in New Issue