diff --git a/Core/ST7735/UI/bmfont.c b/Core/ST7735/UI/bmfont.c index f20c3fe..8f996ce 100644 --- a/Core/ST7735/UI/bmfont.c +++ b/Core/ST7735/UI/bmfont.c @@ -123,7 +123,7 @@ uint16_t bmf_get_text_width(bmf_BitmapFont *font, uint8_t *text, uint32_t bytes_ } // get char width if (unicode == bmf_ASCII_SPACE) { - u8_char_size = u8_char_size / 2; // half width space + u8_char_size = font->char_width / 2; // half width space } else if (unicode == bmf_ASCII_T) { u8_char_size = font->char_width * bmf_TAB_SIZE; } else if (unicode == bmf_ASCII_R || unicode == bmf_ASCII_N) {