1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

lv_txt: do not call lv_font_get_width twice

This commit is contained in:
Gabor Kiss-Vamosi 2019-04-23 15:09:37 +02:00
parent 514e2baaca
commit 1e5f690a45

View File

@ -335,7 +335,7 @@ lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t *
lv_coord_t char_width = lv_font_get_width(font, letter);
if(char_width > 0) {
width += lv_font_get_width(font, letter);
width += char_width;
width += letter_space;
}
}