mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Fix newline height
This commit is contained in:
@@ -174,12 +174,6 @@ void OLED::drawChar(const uint16_t charCode, const FontStyle fontStyle, const ui
|
||||
case FontStyle::SMALL:
|
||||
case FontStyle::LARGE:
|
||||
default:
|
||||
if (charCode == '\x01' && cursor_y == 0) { // 0x01 is used as new line char
|
||||
setCursor(soft_x_limit, 8);
|
||||
return;
|
||||
} else if (charCode <= 0x01) {
|
||||
return;
|
||||
}
|
||||
currentFont = nullptr;
|
||||
index = 0;
|
||||
switch (fontStyle) {
|
||||
@@ -193,6 +187,12 @@ void OLED::drawChar(const uint16_t charCode, const FontStyle fontStyle, const ui
|
||||
fontWidth = 12;
|
||||
break;
|
||||
}
|
||||
if (charCode == '\x01' && cursor_y == 0) { // 0x01 is used as new line char
|
||||
setCursor(soft_x_limit, fontHeight);
|
||||
return;
|
||||
} else if (charCode <= 0x01) {
|
||||
return;
|
||||
}
|
||||
|
||||
currentFont = fontStyle == FontStyle::SMALL ? FontSectionInfo.font06_start_ptr : FontSectionInfo.font12_start_ptr;
|
||||
index = charCode - 2;
|
||||
|
||||
Reference in New Issue
Block a user