Fonts optimization

This commit is contained in:
Bertrand Songis
2019-12-05 18:58:02 +01:00
parent 4b0fc62316
commit 1ecd549987
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -452,11 +452,11 @@ coord_t BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char * s, uint8_
c -= 1;
c += CJK_FIRST_LETTER_INDEX;
uint8_t width = drawChar(x, y, font, fontspecs, c, flags);
INCREMENT_POS(width);
INCREMENT_POS(width + 1);
}
else if (c > 0x20) {
uint8_t width = drawChar(x, y, font, fontspecs, getMappedChar(c), flags);
INCREMENT_POS(width);
INCREMENT_POS(width + 1);
}
else if (c == '\n') {
pos = orig_pos;
+2 -1
View File
@@ -102,7 +102,8 @@ void TextButton::paint(BitmapBuffer * dc)
}
}
dc->drawText(rect.w / 2, (rect.h - getFontHeight(textFlags)) / 2, text.c_str(), CENTERED | textColor);
TRACE("ICI %d %d", rect.h, getFontHeight(textFlags));
dc->drawText(rect.w / 2, (rect.h - getFontHeight(textFlags)) / 2, text.c_str(), CENTERED | textFlags | textColor);
}
void IconButton::paint(BitmapBuffer * dc)