1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00

Fix swedish font (#6750)

Swedish font fix
This commit is contained in:
3djc 2019-09-12 09:52:17 +02:00 committed by Bertrand Songis
parent 43e5f0c502
commit fcea951991
2 changed files with 3 additions and 8 deletions

View file

@ -52,7 +52,7 @@ uint8_t getMappedChar(uint8_t c)
else if (c >= 0x80 && c <= 0x81) {
result = 157 + c - 0x80;
}
#elif defined(TRANSLATIONS_FI)
#elif defined(TRANSLATIONS_FI) || defined(TRANSLATIONS_SE)
else if (c >= 0x80 && c <= 0x85) {
result = 159 + c - 0x80;
}
@ -68,10 +68,6 @@ uint8_t getMappedChar(uint8_t c)
else if (c >= 0x80 && c <= 0x80+21) {
result = 185 + c - 0x80;
}
#elif defined(TRANSLATIONS_SE)
else if (c >= 0x80 && c <= 0x85) {
result = 207 + c - 0x80;
}
#endif
else if (c < 0xC0)
result = c - 0x20;

View file

@ -15,12 +15,11 @@ chars_fi = u"""åäöÅÄÖ"""
chars_it = u"""àù"""
chars_pl = u"""ąćęłńóśżźĄĆĘŁŃÓŚŻŹ"""
chars_pt = u"""ÁáÂâÃãÀàÇçÉéÊêÍíÓóÔôÕõÚú"""
chars_se = u"""åäöÅÄÖ"""
COUNT_EXTRA_CHARS = 21
chars_extra = u"".join([chr(1+i) for i in range(COUNT_EXTRA_CHARS)])
chars = chars_en + chars_extra + chars_fr + chars_de + chars_cz + chars_es + chars_fi + chars_it + chars_pl + chars_se
chars = chars_en + chars_extra + chars_fr + chars_de + chars_cz + chars_es + chars_fi + chars_it + chars_pl
def createFontBitmap(filename, fontname, fontsize, fontoffset, foreground, background, coordsfile=True):