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:
parent
514e2baaca
commit
1e5f690a45
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user