Fonts optimization
This commit is contained in:
+2
-2
@@ -452,11 +452,11 @@ coord_t BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char * s, uint8_
|
|||||||
c -= 1;
|
c -= 1;
|
||||||
c += CJK_FIRST_LETTER_INDEX;
|
c += CJK_FIRST_LETTER_INDEX;
|
||||||
uint8_t width = drawChar(x, y, font, fontspecs, c, flags);
|
uint8_t width = drawChar(x, y, font, fontspecs, c, flags);
|
||||||
INCREMENT_POS(width);
|
INCREMENT_POS(width + 1);
|
||||||
}
|
}
|
||||||
else if (c > 0x20) {
|
else if (c > 0x20) {
|
||||||
uint8_t width = drawChar(x, y, font, fontspecs, getMappedChar(c), flags);
|
uint8_t width = drawChar(x, y, font, fontspecs, getMappedChar(c), flags);
|
||||||
INCREMENT_POS(width);
|
INCREMENT_POS(width + 1);
|
||||||
}
|
}
|
||||||
else if (c == '\n') {
|
else if (c == '\n') {
|
||||||
pos = orig_pos;
|
pos = orig_pos;
|
||||||
|
|||||||
+2
-1
@@ -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)
|
void IconButton::paint(BitmapBuffer * dc)
|
||||||
|
|||||||
Reference in New Issue
Block a user