From e7bab27708886f483090985735d5560f17f85fad Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 12 Mar 2020 12:03:17 +0100 Subject: [PATCH] draw label: skip empty letters. Closes #1407 --- src/lv_draw/lv_draw_label.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index a485d1727..3f06873a5 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -389,6 +389,9 @@ static void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * clip_area return; } + /* Don't draw anything if the character is empty. E.g. space */ + if((g.box_h == 0) && (g.box_w == 0)) return; + int32_t pos_x = pos_p->x + g.ofs_x; int32_t pos_y = pos_p->y + (font_p->line_height - font_p->base_line) - g.box_h - g.ofs_y;