Fonts optimization

This commit is contained in:
Bertrand Songis
2019-12-05 18:58:02 +01:00
parent d5e2f1472e
commit 6228110a48
9 changed files with 81 additions and 57 deletions
@@ -115,9 +115,12 @@ void FullScreenDialog::checkEvents()
void FullScreenDialog::deleteLater()
{
#if !defined(HARDWARE_TOUCH)
if (previousFocus) {
previousFocus->setFocus();
}
#endif
if (running) {
running = false;
}
+2 -2
View File
@@ -113,10 +113,10 @@ int getTextWidth(const char * s, int len, LcdFlags flags)
if (c >= 0x101)
c -= 1;
c += CJK_FIRST_LETTER_INDEX;
result += getFontPatternWidth(specs, c);
result += getFontPatternWidth(specs, c) + 1;
}
else if (c >= 0x20) {
result += getCharWidth(c, specs);
result += getCharWidth(c, specs) + 1;
}
++s;