1
0
forked from me/IronOS

Impl. CJK support with zh-TW and yue-HK translations

Also add support for generating font table using the WenQuanYi Bitmap
Song font.
This commit is contained in:
Alvin Wong
2021-01-22 18:18:32 +08:00
parent 1a8826c0a8
commit 47692024c5
15 changed files with 548820 additions and 17 deletions

View File

@@ -125,7 +125,7 @@ void OLED::drawChar(char c) {
} else if (c == 0) {
return;
}
uint16_t index = c - 2; // First index is \x02
uint16_t index = static_cast<unsigned char>(c) - 2; // First index is \x02
uint8_t *charPointer;
charPointer = ((uint8_t *)currentFont) + ((fontWidth * (fontHeight / 8)) * index);
drawArea(cursor_x, cursor_y, fontWidth, fontHeight, charPointer);