Generate the font from Prusa.lcd

This commit is contained in:
Alex Voinea 2023-01-24 15:50:25 +01:00
parent 8e18c83d51
commit c514774a54
2 changed files with 17 additions and 1 deletions

View File

@ -24,6 +24,14 @@ fontTable = [
CustomCharacter('🕑', 0x87, '\\xe5'),
CustomCharacter('', 0x88, '\\x7e'),
CustomCharacter('', 0x89, '\\x7e'),
CustomCharacter('ă', 0x8a, 'a'),
CustomCharacter('â', 0x8b, 'a'),
CustomCharacter('î', 0x8c, 'i'),
CustomCharacter('ș', 0x8d, 's'),
CustomCharacter('ț', 0x8e, 't'),
CustomCharacter('Î', 0x8f, 'I'),
CustomCharacter('Ș', 0x90, 'S'),
CustomCharacter('Ț', 0x91, 'T'),
# from the default character set:
CustomCharacter('ä', 0xe1),
@ -51,7 +59,7 @@ def generateFont():
CharList = [Char.attrib for Char in root.iter("CHAR")]
f = open(os.path.join(sys.path[0], "FontTable.h"), "w")
f = open(os.path.join(sys.path[0], "FontTable.h"), "w", encoding='utf8')
for x in range(len(fontTable)):
if fontTable[x].default >= 0xE0:
continue

View File

@ -8,3 +8,11 @@
{{0x00, 0x0E, 0x13, 0x15, 0x11, 0x0E, 0x00, 0x00, }, '\xe5'}, // '🕑'
{{0x00, 0x00, 0x11, 0x0A, 0x04, 0x11, 0x0A, 0x04, }, '\x7e'}, // '↡'
{{0x00, 0x01, 0x03, 0x16, 0x1C, 0x08, 0x00, 0x00, }, '\x7e'}, // '✔'
{{0x11, 0x0E, 0x00, 0x0E, 0x01, 0x0F, 0x11, 0x0F, }, 'a'}, // 'ă'
{{0x04, 0x0A, 0x00, 0x0E, 0x01, 0x0F, 0x11, 0x0F, }, 'a'}, // 'â'
{{0x04, 0x0A, 0x00, 0x0C, 0x04, 0x04, 0x04, 0x0E, }, 'i'}, // 'î'
{{0x00, 0x0E, 0x10, 0x0E, 0x01, 0x1E, 0x04, 0x08, }, 's'}, // 'ș'
{{0x08, 0x1C, 0x08, 0x08, 0x09, 0x06, 0x04, 0x08, }, 't'}, // 'ț'
{{0x04, 0x0A, 0x00, 0x0E, 0x04, 0x04, 0x04, 0x0E, }, 'I'}, // 'Î'
{{0x0E, 0x11, 0x0C, 0x06, 0x11, 0x0E, 0x04, 0x08, }, 'S'}, // 'Ș'
{{0x1F, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04, 0x08, }, 'T'}, // 'Ț'