Adding second font

This commit is contained in:
Ben V. Brown
2019-06-17 20:53:17 +10:00
parent 04f3e1aa02
commit 85cba9b9e4
3 changed files with 915 additions and 439 deletions

1
.gitignore vendored
View File

@@ -51,3 +51,4 @@ workspace/TS100A/.settings/language.settings.xml
workspace/TS100A/.metadata/
Translation Editor/.vscode/
Translation Editor/__pycache__/
*.pyc

View File

@@ -1,3 +1,4 @@
#coding=utf-8
def getFontMap():
font = {
" ":"0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,",
@@ -53,7 +54,6 @@ def getFontMap():
"L":"0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x00," ,
"M":"0x00,0xFF,0xFF,0x1E,0x78,0xE0,0xE0,0x78,0x1E,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x00,0x00,0x01,0x01,0x00,0x00,0x3F,0x3F,0x00," ,
"N":"0x00,0xFF,0xFF,0x0E,0x38,0xF0,0xC0,0x00,0x00,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x03,0x07,0x1C,0x3F,0x3F,0x00," ,
"N":"0x00,0xFF,0xFF,0x0E,0x38,0xF0,0xC0,0x00,0x00,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x03,0x07,0x1C,0x3F,0x3F,0x00," ,
"O":"0x00,0xF0,0xFC,0x0E,0x07,0x03,0x03,0x07,0x0E,0xFC,0xF0,0x00,0x00,0x03,0x0F,0x1C,0x38,0x30,0x30,0x38,0x1C,0x0F,0x03,0x00," ,
"P":"0x00,0xFF,0xFF,0x83,0x83,0x83,0x83,0x83,0xC7,0xFE,0x7C,0x00,0x00,0x3F,0x3F,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00," ,
"Р":"0x00,0xFF,0xFF,0x83,0x83,0x83,0x83,0x83,0xC7,0xFE,0x7C,0x00,0x00,0x3F,0x3F,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00," ,
@@ -421,3 +421,424 @@ def getFontMap():
"ſ":"0x00,0x00,0x00,0x00,0xFC,0xFE,0x06,0x06,0x0E,0x0C,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x00,0x00,0x00,0x00,0x00," ,
}
return font
def getSmallFontMap():
font = {
" ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"!":"0x00, 0x00, 0x4f, 0x00, 0x00, 0x00,",
"\"":"0x00, 0x07, 0x00, 0x07, 0x00, 0x00,",
"#":"0x14, 0x7f, 0x14, 0x7f, 0x14, 0x00,",
"$":"0x24, 0x2a, 0x7f, 0x2a, 0x12, 0x00,",
"%":"0x23, 0x13, 0x08, 0x64, 0x62, 0x00,",
"&":"0x36, 0x49, 0x56, 0x20, 0x58, 0x00,",
"'":"0x00, 0x05, 0x03, 0x00, 0x00, 0x00,",
"(":"0x00, 0x1c, 0x22, 0x41, 0x00, 0x00,",
")":"0x00, 0x41, 0x22, 0x1c, 0x00, 0x00,",
"*":"0x14, 0x08, 0x3e, 0x08, 0x14, 0x00,",
"+":"0x08, 0x08, 0x3e, 0x08, 0x08, 0x00,",
",":"0x00, 0x50, 0x30, 0x00, 0x00, 0x00,",
"-":"0x08, 0x08, 0x08, 0x08, 0x08, 0x00,",
".":"0x00, 0x60, 0x60, 0x00, 0x00, 0x00,",
"/":"0x20, 0x10, 0x08, 0x04, 0x02, 0x00,",
"0":"0x3e, 0x51, 0x49, 0x45, 0x3e, 0x00,",
"1":"0x00, 0x42, 0x7f, 0x40, 0x00, 0x00,",
"2":"0x42, 0x61, 0x51, 0x49, 0x46, 0x00,",
"3":"0x21, 0x41, 0x45, 0x4b, 0x31, 0x00,",
"4":"0x18, 0x14, 0x12, 0x7f, 0x10, 0x00,",
"5":"0x27, 0x45, 0x45, 0x45, 0x39, 0x00,",
"6":"0x3c, 0x4a, 0x49, 0x49, 0x30, 0x00,",
"7":"0x01, 0x71, 0x09, 0x05, 0x03, 0x00,",
"8":"0x36, 0x49, 0x49, 0x49, 0x36, 0x00,",
"9":"0x06, 0x49, 0x49, 0x29, 0x1e, 0x00,",
":":"0x00, 0x36, 0x36, 0x00, 0x00, 0x00,",
";":"0x00, 0x56, 0x36, 0x00, 0x00, 0x00,",
"<":"0x08, 0x14, 0x22, 0x41, 0x00, 0x00,",
"=":"0x14, 0x14, 0x14, 0x14, 0x14, 0x00,",
">":"0x00, 0x41, 0x22, 0x14, 0x08, 0x00,",
"?":"0x02, 0x01, 0x51, 0x09, 0x06, 0x00,",
"@":"0x32, 0x49, 0x79, 0x41, 0x3e, 0x00,",
"A":"0x7e, 0x09, 0x09, 0x09, 0x7e, 0x00,",
"B":"0x7f, 0x49, 0x49, 0x49, 0x36, 0x00,",
"C":"0x3e, 0x41, 0x41, 0x41, 0x22, 0x00,",
"D":"0x7f, 0x41, 0x41, 0x22, 0x1c, 0x00,",
"E":"0x7f, 0x49, 0x49, 0x49, 0x41, 0x00,",
"F":"0x7f, 0x09, 0x09, 0x09, 0x01, 0x00,",
"G":"0x3e, 0x41, 0x41, 0x49, 0x7a, 0x00,",
"H":"0x7f, 0x08, 0x08, 0x08, 0x7f, 0x00,",
"I":"0x00, 0x41, 0x7f, 0x41, 0x00, 0x00,",
"J":"0x20, 0x40, 0x41, 0x3f, 0x01, 0x00,",
"K":"0x7f, 0x08, 0x14, 0x22, 0x41, 0x00,",
"L":"0x7f, 0x40, 0x40, 0x40, 0x40, 0x00,",
"M":"0x7f, 0x02, 0x0c, 0x02, 0x7f, 0x00,",
"N":"0x7f, 0x04, 0x08, 0x10, 0x7f, 0x00,",
"O":"0x3e, 0x41, 0x41, 0x41, 0x3e, 0x00,",
"P":"0x7f, 0x09, 0x09, 0x09, 0x06, 0x00,",
"Q":"0x3e, 0x41, 0x51, 0x21, 0x5e, 0x00,",
"R":"0x7f, 0x09, 0x19, 0x29, 0x46, 0x00,",
"S":"0x26, 0x49, 0x49, 0x49, 0x32, 0x00,",
"T":"0x01, 0x01, 0x7f, 0x01, 0x01, 0x00,",
"U":"0x3f, 0x40, 0x40, 0x40, 0x3f, 0x00,",
"V":"0x1f, 0x20, 0x40, 0x20, 0x1f, 0x00,",
"W":"0x3f, 0x40, 0x38, 0x40, 0x3f, 0x00,",
"X":"0x63, 0x14, 0x08, 0x14, 0x63, 0x00,",
"Y":"0x07, 0x08, 0x70, 0x08, 0x07, 0x00,",
"Z":"0x61, 0x51, 0x49, 0x45, 0x43, 0x00,",
"[":"0x00, 0x7f, 0x41, 0x41, 0x00, 0x00,",
"\\":"0x02, 0x04, 0x08, 0x10, 0x20, 0x00,",
"]":"0x00, 0x41, 0x41, 0x7f, 0x00, 0x00,",
"^":"0x04, 0x02, 0x01, 0x02, 0x04, 0x00,",
"_":"0x40, 0x40, 0x40, 0x40, 0x40, 0x00,",
"`":"0x00, 0x03, 0x05, 0x00, 0x00, 0x00,",
"a":"0x20, 0x54, 0x54, 0x54, 0x78, 0x00,",
"b":"0x7f, 0x48, 0x44, 0x44, 0x38, 0x00,",
"c":"0x38, 0x44, 0x44, 0x44, 0x20, 0x00,",
"d":"0x38, 0x44, 0x44, 0x48, 0x7f, 0x00,",
"e":"0x38, 0x54, 0x54, 0x54, 0x18, 0x00,",
"f":"0x00, 0x04, 0x7e, 0x05, 0x01, 0x00,",
"g":"0x08, 0x54, 0x54, 0x54, 0x3c, 0x00,",
"h":"0x7f, 0x08, 0x04, 0x04, 0x78, 0x00,",
"i":"0x00, 0x44, 0x7d, 0x40, 0x00, 0x00,",
"j":"0x20, 0x40, 0x44, 0x3d, 0x00, 0x00,",
"k":"0x00, 0x7f, 0x10, 0x28, 0x44, 0x00,",
"l":"0x00, 0x41, 0x7f, 0x40, 0x00, 0x00,",
"m":"0x7c, 0x04, 0x78, 0x04, 0x78, 0x00,",
"n":"0x7c, 0x08, 0x04, 0x04, 0x78, 0x00,",
"o":"0x38, 0x44, 0x44, 0x44, 0x38, 0x00,",
"p":"0x7c, 0x14, 0x14, 0x14, 0x08, 0x00,",
"q":"0x08, 0x14, 0x14, 0x14, 0x7c, 0x00,",
"r":"0x7c, 0x08, 0x04, 0x04, 0x08, 0x00,",
"s":"0x48, 0x54, 0x54, 0x54, 0x24, 0x00,",
"t":"0x04, 0x3e, 0x44, 0x40, 0x20, 0x00,",
"u":"0x3c, 0x40, 0x40, 0x20, 0x7c, 0x00,",
"v":"0x0c, 0x30, 0x40, 0x30, 0x0c, 0x00,",
"w":"0x3c, 0x40, 0x30, 0x40, 0x3c, 0x00,",
"x":"0x44, 0x24, 0x38, 0x48, 0x44, 0x00,",
"y":"0x44, 0x48, 0x30, 0x10, 0x0c, 0x00,",
"z":"0x44, 0x64, 0x54, 0x4c, 0x44, 0x00,",
"{":"0x08, 0x36, 0x41, 0x00, 0x00, 0x00,",
"|":"0x00, 0x00, 0x77, 0x00, 0x00, 0x00,",
"}":"0x00, 0x00, 0x41, 0x36, 0x08, 0x00,",
"~":"0x02, 0x01, 0x02, 0x04, 0x02, 0x00,",
"^":"0x04, 0x02, 0x01, 0x02, 0x04, 0x00,",
" ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"¡":"0x00, 0x00, 0x79, 0x00, 0x00, 0x00,",
"¢":"0x1c, 0x22, 0x7f, 0x22, 0x10, 0x00,",
"£":"0x50, 0x7e, 0x51, 0x41, 0x42, 0x00,",
"¤":"0x22, 0x1c, 0x14, 0x1c, 0x22, 0x00,",
"¥":"0x15, 0x16, 0x7c, 0x16, 0x15, 0x00,",
"¦":"0x00, 0x00, 0x77, 0x00, 0x00, 0x00,",
"§":"0x4a, 0x55, 0x55, 0x55, 0x29, 0x00,",
"¨":"0x00, 0x01, 0x00, 0x01, 0x00, 0x00,",
"©":"0x00, 0x18, 0x24, 0x24, 0x00, 0x00,",
"ª":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"«":"0x08, 0x14, 0x00, 0x08, 0x14, 0x00,",
"¬":"0x08, 0x08, 0x08, 0x08, 0x38, 0x00,",
"­":"0x08, 0x08, 0x08, 0x08, 0x08, 0x00,",
"®":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"¯":"0x00, 0x01, 0x01, 0x01, 0x00, 0x00,",
"°":"0x00, 0x00, 0x07, 0x05, 0x07, 0x00,",
"±":"0x44, 0x44, 0x5f, 0x44, 0x44, 0x00,",
"²":"0x1d, 0x15, 0x17, 0x00, 0x00, 0x00,",
"³":"0x15, 0x15, 0x1f, 0x00, 0x00, 0x00,",
"´":"0x00, 0x04, 0x02, 0x01, 0x00, 0x00,",
"µ":"0x7c, 0x10, 0x10, 0x0c, 0x10, 0x00,",
"":"0x02, 0x07, 0x7f, 0x01, 0x7f, 0x00,",
"·":"0x00, 0x00, 0x08, 0x00, 0x00, 0x00,",
"¸":"0x00, 0x40, 0x60, 0x00, 0x00, 0x00,",
"¹":"0x12, 0x1f, 0x10, 0x00, 0x00, 0x00,",
"º":"0x07, 0x05, 0x07, 0x00, 0x00, 0x00,",
"»":"0x14, 0x08, 0x00, 0x14, 0x08, 0x00,",
"¼":"0x21, 0x17, 0x38, 0x24, 0x72, 0x00,",
"½":"0x21, 0x17, 0x78, 0x54, 0x5e, 0x00,",
"¾":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"¿":"0x30, 0x48, 0x45, 0x40, 0x20, 0x00,",
"À":"0x78, 0x15, 0x16, 0x14, 0x78, 0x00,",
"Á":"0x78, 0x14, 0x16, 0x15, 0x78, 0x00,",
"Â":"0x78, 0x16, 0x15, 0x16, 0x78, 0x00,",
"Ã":"0x7a, 0x29, 0x2a, 0x79, 0x00, 0x00,",
"Ä":"0x78, 0x15, 0x14, 0x15, 0x78, 0x00,",
"Å":"0x78, 0x14, 0x15, 0x14, 0x78, 0x00,",
"Æ":"0x7e, 0x09, 0x7f, 0x49, 0x49, 0x00,",
"Ç":"0x0e, 0x51, 0x71, 0x11, 0x08, 0x00,",
"È":"0x7c, 0x55, 0x56, 0x44, 0x44, 0x00,",
"É":"0x7c, 0x54, 0x56, 0x45, 0x44, 0x00,",
"Ê":"0x7c, 0x56, 0x55, 0x46, 0x44, 0x00,",
"Ë":"0x7c, 0x55, 0x54, 0x45, 0x44, 0x00,",
"Ì":"0x00, 0x49, 0x7a, 0x48, 0x00, 0x00,",
"Í":"0x00, 0x48, 0x7a, 0x49, 0x00, 0x00,",
"Î":"0x00, 0x4a, 0x79, 0x4a, 0x00, 0x00,",
"Ï":"0x44, 0x45, 0x7c, 0x45, 0x44, 0x00,",
"Ð":"0x08, 0x7f, 0x49, 0x22, 0x1c, 0x00,",
"Ñ":"0x7a, 0x11, 0x22, 0x79, 0x00, 0x00,",
"Ò":"0x38, 0x45, 0x46, 0x44, 0x38, 0x00,",
"Ó":"0x38, 0x44, 0x46, 0x45, 0x38, 0x00,",
"Ô":"0x38, 0x46, 0x45, 0x46, 0x38, 0x00,",
"Õ":"0x32, 0x49, 0x4a, 0x31, 0x00, 0x00,",
"Ö":"0x38, 0x45, 0x44, 0x45, 0x38, 0x00,",
"×":"0x22, 0x14, 0x08, 0x14, 0x22, 0x00,",
"Ø":"0x58, 0x24, 0x54, 0x48, 0x34, 0x00,",
"Ù":"0x38, 0x41, 0x42, 0x40, 0x38, 0x00,",
"Ú":"0x38, 0x40, 0x42, 0x41, 0x38, 0x00,",
"Û":"0x38, 0x42, 0x41, 0x42, 0x38, 0x00,",
"Ü":"0x3c, 0x41, 0x40, 0x41, 0x3c, 0x00,",
"Ý":"0x04, 0x08, 0x72, 0x09, 0x04, 0x00,",
"Þ":"0x7f, 0x22, 0x22, 0x22, 0x1c, 0x00,",
"ß":"0x7e, 0x11, 0x25, 0x25, 0x1a, 0x00,",
"à":"0x20, 0x55, 0x56, 0x54, 0x78, 0x00,",
"á":"0x20, 0x54, 0x56, 0x55, 0x78, 0x00,",
"â":"0x20, 0x56, 0x55, 0x56, 0x78, 0x00,",
"ã":"0x22, 0x55, 0x56, 0x55, 0x78, 0x00,",
"ä":"0x20, 0x55, 0x54, 0x55, 0x78, 0x00,",
"å":"0x20, 0x54, 0x55, 0x54, 0x78, 0x00,",
"æ":"0x24, 0x54, 0x7c, 0x54, 0x48, 0x00,",
"ç":"0x1c, 0x22, 0x62, 0x22, 0x10, 0x00,",
"è":"0x38, 0x55, 0x56, 0x54, 0x08, 0x00,",
"é":"0x38, 0x54, 0x56, 0x55, 0x08, 0x00,",
"ê":"0x38, 0x56, 0x55, 0x56, 0x08, 0x00,",
"ë":"0x38, 0x55, 0x54, 0x55, 0x08, 0x00,",
"ì":"0x00, 0x45, 0x7e, 0x40, 0x00, 0x00,",
"í":"0x00, 0x44, 0x7e, 0x41, 0x00, 0x00,",
"î":"0x00, 0x46, 0x7d, 0x42, 0x00, 0x00,",
"ï":"0x00, 0x45, 0x7c, 0x41, 0x00, 0x00,",
"ð":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"ñ":"0x78, 0x12, 0x09, 0x0a, 0x71, 0x00,",
"ò":"0x38, 0x45, 0x46, 0x44, 0x38, 0x00,",
"ó":"0x38, 0x44, 0x46, 0x45, 0x38, 0x00,",
"ô":"0x38, 0x46, 0x45, 0x46, 0x38, 0x00,",
"õ":"0x32, 0x49, 0x4a, 0x31, 0x00, 0x00,",
"ö":"0x38, 0x45, 0x44, 0x45, 0x38, 0x00,",
"÷":"0x08, 0x08, 0x2a, 0x08, 0x08, 0x00,",
"ø":"0x58, 0x24, 0x54, 0x48, 0x34, 0x00,",
"ù":"0x3c, 0x41, 0x42, 0x20, 0x7c, 0x00,",
"ú":"0x3c, 0x40, 0x42, 0x21, 0x7c, 0x00,",
"û":"0x3c, 0x42, 0x41, 0x22, 0x7c, 0x00,",
"ü":"0x3c, 0x41, 0x40, 0x21, 0x5c, 0x00,",
"ý":"0x44, 0x48, 0x32, 0x11, 0x0c, 0x00,",
"þ":"0x7c, 0x28, 0x28, 0x10, 0x00, 0x00,",
"ÿ":"0x44, 0x49, 0x30, 0x11, 0x0c, 0x00,",
"Ѐ":"0x7c, 0x55, 0x56, 0x44, 0x44, 0x00,",
"Ё":"0x7c, 0x55, 0x54, 0x45, 0x44, 0x00,",
"Ђ":"0x01, 0x7f, 0x09, 0x49, 0x31, 0x00,",
"Ѓ":"0x7c, 0x04, 0x06, 0x05, 0x04, 0x00,",
"Є":"0x3e, 0x49, 0x49, 0x41, 0x00, 0x00,",
"Ѕ":"0x06, 0x49, 0x49, 0x49, 0x30, 0x00,",
"І":"0x41, 0x41, 0x7f, 0x41, 0x41, 0x00,",
"Ї":"0x44, 0x45, 0x7c, 0x45, 0x44, 0x00,",
"Ј":"0x20, 0x40, 0x41, 0x3f, 0x01, 0x00,",
"Љ":"0x7f, 0x01, 0x7f, 0x48, 0x30, 0x00,",
"Њ":"0x7f, 0x08, 0x7f, 0x48, 0x30, 0x00,",
"Ћ":"0x01, 0x01, 0x7f, 0x09, 0x71, 0x00,",
"Ќ":"0x7c, 0x12, 0x29, 0x44, 0x00, 0x00,",
"Ѝ":"0x7c, 0x21, 0x12, 0x08, 0x7c, 0x00,",
"Ў":"0x44, 0x49, 0x32, 0x09, 0x04, 0x00,",
"Џ":"0x3f, 0x20, 0x60, 0x20, 0x3f, 0x00,",
"А":"0x7e, 0x09, 0x09, 0x09, 0x7e, 0x00,",
"Б":"0x7f, 0x49, 0x49, 0x49, 0x31, 0x00,",
"В":"0x7f, 0x49, 0x49, 0x49, 0x36, 0x00,",
"Г":"0x7f, 0x01, 0x01, 0x01, 0x01, 0x00,",
"Д":"0x60, 0x3f, 0x21, 0x3f, 0x60, 0x00,",
"Е":"0x7f, 0x49, 0x49, 0x49, 0x41, 0x00,",
"Ж":"0x77, 0x08, 0x7f, 0x08, 0x77, 0x00,",
"З":"0x00, 0x41, 0x49, 0x49, 0x36, 0x00,",
"И":"0x7f, 0x10, 0x08, 0x04, 0x7f, 0x00,",
"Й":"0x7c, 0x21, 0x12, 0x09, 0x7c, 0x00,",
"К":"0x7f, 0x08, 0x14, 0x22, 0x41, 0x00,",
"Л":"0x40, 0x3f, 0x01, 0x01, 0x7f, 0x00,",
"М":"0x7f, 0x02, 0x04, 0x02, 0x7f, 0x00,",
"Н":"0x7f, 0x08, 0x08, 0x08, 0x7f, 0x00,",
"О":"0x3e, 0x41, 0x41, 0x41, 0x3e, 0x00,",
"П":"0x7f, 0x01, 0x01, 0x01, 0x7f, 0x00,",
"Р":"0x7f, 0x09, 0x09, 0x09, 0x06, 0x00,",
"С":"0x3e, 0x41, 0x41, 0x41, 0x22, 0x00,",
"Т":"0x01, 0x01, 0x7f, 0x01, 0x01, 0x00,",
"У":"0x47, 0x48, 0x30, 0x08, 0x07, 0x00,",
"Ф":"0x0c, 0x12, 0x7f, 0x12, 0x0c, 0x00,",
"Х":"0x63, 0x14, 0x08, 0x14, 0x63, 0x00,",
"Ц":"0x3f, 0x20, 0x20, 0x3f, 0x60, 0x00,",
"Ч":"0x07, 0x08, 0x08, 0x08, 0x7f, 0x00,",
"Ш":"0x3f, 0x20, 0x3f, 0x20, 0x3f, 0x00,",
"Щ":"0x3f, 0x20, 0x3f, 0x20, 0x3f, 0x60,",
"Ъ":"0x01, 0x7f, 0x48, 0x48, 0x30, 0x00,",
"Ы":"0x7f, 0x48, 0x30, 0x00, 0x7f, 0x00,",
"Ь":"0x00, 0x7f, 0x48, 0x48, 0x30, 0x00,",
"Э":"0x22, 0x49, 0x49, 0x2a, 0x1c, 0x00,",
"Ю":"0x7f, 0x08, 0x3e, 0x41, 0x3e, 0x00,",
"Я":"0x46, 0x29, 0x19, 0x09, 0x7f, 0x00,",
"а":"0x20, 0x54, 0x54, 0x54, 0x78, 0x00,",
"б":"0x3c, 0x4a, 0x4a, 0x4a, 0x30, 0x00,",
"в":"0x7c, 0x54, 0x54, 0x54, 0x28, 0x00,",
"г":"0x7c, 0x04, 0x04, 0x04, 0x04, 0x00,",
"д":"0x40, 0x3c, 0x24, 0x3c, 0x60, 0x00,",
"е":"0x38, 0x54, 0x54, 0x54, 0x18, 0x00,",
"ж":"0x6c, 0x10, 0x7c, 0x10, 0x6c, 0x00,",
"з":"0x28, 0x44, 0x54, 0x54, 0x28, 0x00,",
"и":"0x7c, 0x20, 0x10, 0x08, 0x7c, 0x00,",
"й":"0x7c, 0x21, 0x12, 0x09, 0x7c, 0x00,",
"к":"0x7c, 0x10, 0x28, 0x44, 0x00, 0x00,",
"л":"0x40, 0x3c, 0x04, 0x04, 0x7c, 0x00,",
"м":"0x7c, 0x08, 0x10, 0x08, 0x7c, 0x00,",
"н":"0x7c, 0x10, 0x10, 0x10, 0x7c, 0x00,",
"о":"0x38, 0x44, 0x44, 0x44, 0x38, 0x00,",
"п":"0x7c, 0x04, 0x04, 0x04, 0x7c, 0x00,",
"р":"0x7c, 0x14, 0x14, 0x14, 0x08, 0x00,",
"с":"0x38, 0x44, 0x44, 0x44, 0x20, 0x00,",
"т":"0x04, 0x04, 0x7c, 0x04, 0x04, 0x00,",
"у":"0x4c, 0x50, 0x20, 0x10, 0x0c, 0x00,",
"ф":"0x18, 0x24, 0x7e, 0x24, 0x18, 0x00,",
"х":"0x44, 0x28, 0x10, 0x28, 0x44, 0x00,",
"ц":"0x3c, 0x20, 0x20, 0x3c, 0x60, 0x00,",
"ч":"0x0c, 0x10, 0x10, 0x10, 0x7c, 0x00,",
"ш":"0x3c, 0x20, 0x3c, 0x20, 0x3c, 0x00,",
"щ":"0x3c, 0x20, 0x3c, 0x20, 0x7c, 0x00,",
"ъ":"0x04, 0x7c, 0x50, 0x20, 0x00, 0x00,",
"ы":"0x7c, 0x50, 0x20, 0x00, 0x7c, 0x00,",
"ь":"0x00, 0x7c, 0x50, 0x20, 0x00, 0x00,",
"э":"0x28, 0x44, 0x54, 0x54, 0x28, 0x00,",
"ю":"0x7c, 0x10, 0x38, 0x44, 0x38, 0x00,",
"я":"0x48, 0x34, 0x14, 0x14, 0x7c, 0x00,",
"ѐ":"0x38, 0x55, 0x56, 0x54, 0x08, 0x00,",
"ё":"0x38, 0x55, 0x54, 0x55, 0x08, 0x00,",
"ђ":"0x02, 0x3f, 0x12, 0x48, 0x30, 0x00,",
"ѓ":"0x7c, 0x04, 0x06, 0x05, 0x04, 0x00,",
"є":"0x38, 0x54, 0x54, 0x44, 0x28, 0x00,",
"ѕ":"0x08, 0x54, 0x54, 0x54, 0x20, 0x00,",
"і":"0x00, 0x44, 0x7d, 0x40, 0x00, 0x00,",
"ї":"0x00, 0x45, 0x7c, 0x41, 0x00, 0x00,",
"ј":"0x20, 0x40, 0x44, 0x3d, 0x00, 0x00,",
"љ":"0x7c, 0x04, 0x7c, 0x50, 0x20, 0x00,",
"њ":"0x7c, 0x10, 0x7c, 0x50, 0x20, 0x00,",
"ћ":"0x04, 0x7e, 0x14, 0x10, 0x60, 0x00,",
"ќ":"0x7c, 0x12, 0x29, 0x44, 0x00, 0x00,",
"ѝ":"0x7c, 0x21, 0x12, 0x08, 0x7c, 0x00,",
"ў":"0x4c, 0x51, 0x22, 0x11, 0x0c, 0x00,",
"џ":"0x3c, 0x20, 0x60, 0x20, 0x3c, 0x00,",
"Ā":"0x78, 0x15, 0x15, 0x15, 0x78, 0x00,",
"ā":"0x20, 0x55, 0x55, 0x55, 0x78, 0x00,",
"Ă":"0x78, 0x15, 0x16, 0x15, 0x78, 0x00,",
"ă":"0x20, 0x55, 0x56, 0x55, 0x78, 0x00,",
"Ą":"0x7e, 0x09, 0x09, 0x49, 0xbe, 0x00,",
"ą":"0x20, 0x54, 0x54, 0xd4, 0x78, 0x00,",
"Ć":"0x38, 0x44, 0x46, 0x45, 0x28, 0x00,",
"ć":"0x38, 0x44, 0x46, 0x45, 0x20, 0x00,",
"Ĉ":"0x38, 0x46, 0x45, 0x46, 0x28, 0x00,",
"ĉ":"0x38, 0x46, 0x45, 0x46, 0x20, 0x00,",
"Ċ":"0x38, 0x44, 0x45, 0x44, 0x28, 0x00,",
"ċ":"0x38, 0x44, 0x45, 0x44, 0x20, 0x00,",
"Č":"0x38, 0x45, 0x46, 0x45, 0x28, 0x00,",
"č":"0x38, 0x45, 0x46, 0x45, 0x20, 0x00,",
"Ď":"0x7c, 0x45, 0x46, 0x29, 0x10, 0x00,",
"ď":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Đ":"0x08, 0x7f, 0x49, 0x22, 0x1c, 0x00,",
"đ":"0x38, 0x44, 0x44, 0x4A, 0x7F, 0x00,",
"Ē":"0x7c, 0x55, 0x55, 0x55, 0x44, 0x00,",
"ē":"0x38, 0x55, 0x55, 0x55, 0x08, 0x00,",
"Ĕ":"0x7c, 0x55, 0x56, 0x55, 0x44, 0x00,",
"ĕ":"0x38, 0x55, 0x56, 0x55, 0x08, 0x00,",
"Ė":"0x7c, 0x54, 0x55, 0x54, 0x44, 0x00,",
"ė":"0x38, 0x54, 0x55, 0x54, 0x08, 0x00,",
"Ę":"0x7f, 0x49, 0x49, 0xc9, 0x41, 0x00,",
"ę":"0x38, 0x54, 0x54, 0xd4, 0x18, 0x00,",
"Ě":"0x7c, 0x55, 0x56, 0x55, 0x44, 0x00,",
"ě":"0x38, 0x55, 0x56, 0x55, 0x08, 0x00,",
"Ĝ":"0x38, 0x46, 0x55, 0x56, 0x70, 0x00,",
"ĝ":"0x08, 0x56, 0x55, 0x56, 0x3c, 0x00,",
"Ğ":"0x38, 0x45, 0x56, 0x55, 0x30, 0x00,",
"ğ":"0x08, 0x55, 0x56, 0x55, 0x3c, 0x00,",
"Ġ":"0x38, 0x44, 0x55, 0x54, 0x30, 0x00,",
"ġ":"0x08, 0x54, 0x55, 0x54, 0x3c, 0x00,",
"Ģ":"0x0e, 0x51, 0x35, 0x15, 0x1c, 0x00,",
"ģ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Ĥ":"0x7c, 0x12, 0x11, 0x12, 0x7c, 0x00,",
"ĥ":"0x02, 0x79, 0x22, 0x10, 0x60, 0x00,",
"Ħ":"0x02, 0x7f, 0x0a, 0x7f, 0x02, 0x00,",
"ħ":"0x02, 0x7f, 0x12, 0x08, 0x70, 0x00,",
"Ĩ":"0x4a, 0x49, 0x7a, 0x49, 0x48, 0x00,",
"ĩ":"0x02, 0x49, 0x7a, 0x41, 0x00, 0x00,",
"Ī":"0x44, 0x45, 0x7d, 0x45, 0x44, 0x00,",
"ī":"0x00, 0x45, 0x7d, 0x41, 0x00, 0x00,",
"Ĭ":"0x44, 0x45, 0x7e, 0x45, 0x44, 0x00,",
"ĭ":"0x00, 0x45, 0x7e, 0x41, 0x00, 0x00,",
"Į":"0x00, 0x41, 0x7f, 0xc1, 0x00, 0x00,",
"į":"0x00, 0x44, 0x7d, 0xc0, 0x00, 0x00,",
"İ":"0x44, 0x44, 0x7d, 0x44, 0x44, 0x00,",
"ı":"0x00, 0x44, 0x7c, 0x40, 0x00, 0x00,",
"IJ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"ij":"0x44, 0x7d, 0x40, 0x44, 0x3d, 0x00,",
"Ĵ":"0x20, 0x40, 0x46, 0x3d, 0x06, 0x00,",
"ĵ":"0x00, 0x20, 0x46, 0x3d, 0x02, 0x00,",
"Ķ":"0x1f, 0x44, 0x2a, 0x11, 0x00, 0x00,",
"ķ":"0x1f, 0x44, 0x2a, 0x11, 0x00, 0x00,",
"ĸ":"0x7c, 0x10, 0x28, 0x44, 0x00, 0x00,",
"Ĺ":"0x7c, 0x40, 0x42, 0x41, 0x40, 0x00,",
"ĺ":"0x00, 0x44, 0x7e, 0x41, 0x00, 0x00,",
"Ļ":"0x1f, 0x50, 0x30, 0x10, 0x10, 0x00,",
"ļ":"0x00, 0x51, 0x3f, 0x10, 0x00, 0x00,",
"Ľ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"ľ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Ŀ":"0x7f, 0x40, 0x40, 0x48, 0x40, 0x00,",
"ŀ":"0x00, 0x41, 0x7f, 0x40, 0x08, 0x00,",
"Ł":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"ł":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Ń":"0x7c, 0x08, 0x12, 0x21, 0x7c, 0x00,",
"ń":"0x7c, 0x08, 0x06, 0x05, 0x78, 0x00,",
"Ņ":"0x1f, 0x42, 0x24, 0x08, 0x1f, 0x00,",
"ņ":"0x1f, 0x42, 0x21, 0x01, 0x1e, 0x00,",
"Ň":"0x7c, 0x09, 0x12, 0x21, 0x7c, 0x00,",
"ň":"0x7c, 0x09, 0x06, 0x05, 0x78, 0x00,",
"ʼn":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Ŋ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"ŋ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Ō":"0x38, 0x45, 0x45, 0x45, 0x38, 0x00,",
"ō":"0x38, 0x45, 0x45, 0x45, 0x38, 0x00,",
"Ŏ":"0x38, 0x45, 0x46, 0x45, 0x38, 0x00,",
"ŏ":"0x38, 0x45, 0x46, 0x45, 0x38, 0x00,",
"Ő":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"ő":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Œ":"0x3e, 0x41, 0x7f, 0x49, 0x49, 0x00,",
"œ":"0x38, 0x44, 0x7c, 0x54, 0x58, 0x00,",
"Ŕ":"0x7c, 0x14, 0x16, 0x15, 0x68, 0x00,",
"ŕ":"0x7c, 0x08, 0x06, 0x05, 0x08, 0x00,",
"Ŗ":"0x1f, 0x45, 0x25, 0x05, 0x1a, 0x00,",
"ŗ":"0x1f, 0x42, 0x21, 0x01, 0x02, 0x00,",
"Ř":"0x7c, 0x15, 0x16, 0x15, 0x68, 0x00,",
"ř":"0x7c, 0x09, 0x06, 0x05, 0x08, 0x00,",
"Ś":"0x08, 0x54, 0x56, 0x55, 0x20, 0x00,",
"ś":"0x48, 0x54, 0x56, 0x55, 0x24, 0x00,",
"Ŝ":"0x08, 0x56, 0x55, 0x56, 0x20, 0x00,",
"ŝ":"0x48, 0x56, 0x55, 0x56, 0x24, 0x00,",
"Ş":"0x02, 0x55, 0x35, 0x15, 0x08, 0x00,",
"ş":"0x12, 0x55, 0x35, 0x15, 0x09, 0x00,",
"Š":"0x08, 0x55, 0x56, 0x55, 0x20, 0x00,",
"š":"0x48, 0x55, 0x56, 0x55, 0x24, 0x00,",
"Ţ":"0x01, 0x41, 0x3f, 0x01, 0x01, 0x00,",
"ţ":"0x02, 0x4f, 0x32, 0x10, 0x08, 0x00,",
"Ť":"0x04, 0x05, 0x7e, 0x05, 0x04, 0x00,",
"ť":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Ŧ":"0x01, 0x09, 0x7f, 0x09, 0x01, 0x00,",
"ŧ":"0x14, 0x3e, 0x54, 0x40, 0x20, 0x00,",
"Ũ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"ũ":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Ū":"0x3c, 0x41, 0x41, 0x41, 0x3c, 0x00,",
"ū":"0x3c, 0x41, 0x41, 0x21, 0x7c, 0x00,",
"Ŭ":"0x3c, 0x41, 0x42, 0x41, 0x3c, 0x00,",
"ŭ":"0x3c, 0x41, 0x41, 0x21, 0x7c, 0x00,",
"Ů":"0x3c, 0x40, 0x41, 0x40, 0x3c, 0x00,",
"ů":"0x3c, 0x41, 0x41, 0x21, 0x7c, 0x00,",
"Ű":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"ű":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Ų":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"ų":"0x00, 0x00, 0x00, 0x00, 0x00, 0x00,",
"Ŵ":"0x3c, 0x42, 0x39, 0x42, 0x3c, 0x00,",
"ŵ":"0x3c, 0x42, 0x31, 0x42, 0x3c, 0x00,",
"Ŷ":"0x04, 0x0a, 0x71, 0x0a, 0x04, 0x00,",
"ŷ":"0x04, 0x4a, 0x31, 0x12, 0x0c, 0x00,",
"Ÿ":"0x04, 0x09, 0x70, 0x09, 0x04, 0x00,",
"Ź":"0x44, 0x64, 0x56, 0x4d, 0x44, 0x00,",
"ź":"0x44, 0x64, 0x56, 0x4d, 0x44, 0x00,",
"Ż":"0x44, 0x64, 0x55, 0x4c, 0x44, 0x00,",
"ż":"0x44, 0x64, 0x55, 0x4c, 0x44, 0x00,",
"Ž":"0x44, 0x65, 0x56, 0x4d, 0x44, 0x00,",
"ž":"0x44, 0x65, 0x56, 0x4d, 0x44, 0x00,",
"ſ":"0x00, 0x04, 0x7e, 0x01, 0x01, 0x00,",
}
return font

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#coding=utf-8
from __future__ import print_function
import json
import os
@@ -85,10 +85,46 @@ def getLetterCounts(defs, lang):
for mod in defs['menuOptions']:
eid = mod['id']
textList.append(obj[eid]['desc'])
obj = lang['messages']
for mod in defs['messages']:
eid = mod['id']
textList.append(obj[eid])
obj = lang['characters']
for mod in defs['characters']:
eid = mod['id']
textList.append(obj[eid])
obj = lang['menuOptions']
for mod in defs['menuOptions']:
eid = mod['id']
if lang['menuDouble']:
textList.append(obj[eid]['text2'][0])
textList.append(obj[eid]['text2'][1])
else:
textList.append(obj[eid]['text'])
obj = lang['menuGroups']
for mod in defs['menuGroups']:
eid = mod['id']
textList.append(obj[eid]['text2'][0])
textList.append(obj[eid]['text2'][1])
obj = lang['menuGroups']
for mod in defs['menuGroups']:
eid = mod['id']
textList.append(obj[eid]['desc'])
# collapse all strings down into the composite letters and store totals for these
symbolCounts = {}
for line in textList:
line = line.replace('\n', '').replace('\r', '')
line = line.replace('\\n', '').replace('\\r', '')
if len(line):
#print(line)
for letter in line:
symbolCounts[letter] = symbolCounts.get(letter, 0) + 1
symbolCounts = sorted(
@@ -112,7 +148,7 @@ def getFontMapAndTable(textList):
fontTable = getFontMap()
for sym in textList:
if sym not in fontTable:
print(f'Missing font element for {sym}')
print('Missing font element for {}'.format(sym))
exit(1)
fontLine = fontTable[sym]
fontTableStrings.append(fontLine)
@@ -123,16 +159,18 @@ def getFontMapAndTable(textList):
outputTable = outputTable + "};" + to_unicode("\n")
return (outputTable, symbolMap)
def convStr(symbolConversionTable, text):
# convert all of the symbols from the string into escapes for their content
outputString = ""
for c in text:
for c in text.replace('\\n', '').replace('\\r', ''):
if c not in symbolConversionTable:
print(f'Missing font definition for {c}')
print('Missing font definition for {}'.format(c))
else:
outputString = outputString + symbolConversionTable[c]
return outputString
def writeLanguage(languageCode, defs, f):
print("Generating block for " + languageCode)
lang = langDict[languageCode]
@@ -168,7 +206,10 @@ def writeLanguage(languageCode, defs, f):
if 'feature' in mod:
f.write(to_unicode("#ifdef " + mod['feature'] + "\n"))
f.write(to_unicode(" /* " + eid.ljust(maxLen)[:maxLen] + " */ "))
f.write(to_unicode("\"" + convStr(symbolConversionTable,(obj[eid]['desc'])) + "\",\n"))
f.write(
to_unicode("\"" +
convStr(symbolConversionTable, (obj[eid]['desc'])) +
"\",\n"))
if 'feature' in mod:
f.write(to_unicode("#endif\n"))
@@ -181,8 +222,8 @@ def writeLanguage(languageCode, defs, f):
for mod in defs['messages']:
eid = mod['id']
f.write(
to_unicode("const char* " + eid + " = \"" + convStr(symbolConversionTable,(obj[eid])) +
"\";\n"))
to_unicode("const char* " + eid + " = \"" +
convStr(symbolConversionTable, (obj[eid])) + "\";\n"))
f.write(to_unicode("\n"))
@@ -192,7 +233,9 @@ def writeLanguage(languageCode, defs, f):
for mod in defs['characters']:
eid = mod['id']
f.write(to_unicode("const char* " + eid + " = '" + convStr(symbolConversionTable,obj[eid]) + "';\n"))
f.write(
to_unicode("const char* " + eid + " = '" +
convStr(symbolConversionTable, obj[eid]) + "';\n"))
f.write(to_unicode("\n"))
@@ -216,10 +259,17 @@ def writeLanguage(languageCode, defs, f):
f.write(to_unicode(" /* " + eid.ljust(maxLen)[:maxLen] + " */ "))
if lang['menuDouble']:
f.write(
to_unicode("{ \"" + convStr(symbolConversionTable,(obj[eid]['text2'][0])) + "\", \"" +
convStr(symbolConversionTable,(obj[eid]['text2'][1])) + "\" },\n"))
to_unicode(
"{ \"" +
convStr(symbolConversionTable, (obj[eid]['text2'][0])) +
"\", \"" +
convStr(symbolConversionTable, (obj[eid]['text2'][1])) +
"\" },\n"))
else:
f.write(to_unicode("{ \"" + convStr(symbolConversionTable,(obj[eid]['text'])) + "\" },\n"))
f.write(
to_unicode("{ \"" +
convStr(symbolConversionTable, (obj[eid]['text'])) +
"\" },\n"))
if 'feature' in mod:
f.write(to_unicode("#endif\n"))
@@ -236,8 +286,9 @@ def writeLanguage(languageCode, defs, f):
eid = mod['id']
f.write(to_unicode(" /* " + eid.ljust(maxLen)[:maxLen] + " */ "))
f.write(
to_unicode("\"" + convStr(symbolConversionTable,(obj[eid]['text2'][0]) + "\\n" +
obj[eid]['text2'][1]) + "\",\n"))
to_unicode("\"" +
convStr(symbolConversionTable, (obj[eid]['text2'][0]) +
"\\n" + obj[eid]['text2'][1]) + "\",\n"))
f.write(to_unicode("};\n\n"))
@@ -251,7 +302,10 @@ def writeLanguage(languageCode, defs, f):
for mod in defs['menuGroups']:
eid = mod['id']
f.write(to_unicode(" /* " + eid.ljust(maxLen)[:maxLen] + " */ "))
f.write(to_unicode("\"" + convStr(symbolConversionTable,(obj[eid]['desc'])) + "\",\n"))
f.write(
to_unicode("\"" +
convStr(symbolConversionTable, (obj[eid]['desc'])) +
"\",\n"))
f.write(to_unicode("};\n\n"))