Do not print for missing glyph if its height OR width is zero

Fixes: #1674
This commit is contained in:
Gabor Kiss-Vamosi
2020-07-21 16:39:04 +02:00
parent 35b3a1f2a4
commit 557342cc08
2 changed files with 4 additions and 1 deletions

View File

@@ -420,7 +420,7 @@ LV_ATTRIBUTE_FAST_MEM static void lv_draw_letter(const lv_point_t * pos_p, const
}
/* Don't draw anything if the character is empty. E.g. space */
if((g.box_h == 0) && (g.box_w == 0)) return;
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;