aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdisp')
-rw-r--r--src/gdisp/mcufont/mf_justify.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gdisp/mcufont/mf_justify.c b/src/gdisp/mcufont/mf_justify.c
index 488478ef..598c0787 100644
--- a/src/gdisp/mcufont/mf_justify.c
+++ b/src/gdisp/mcufont/mf_justify.c
@@ -59,6 +59,17 @@ int16_t mf_get_string_width(const struct mf_font_s *font, mf_str text,
{
c2 = mf_getchar(&text);
+ if (c2 == '\t')
+ {
+#if MF_USE_TABS
+ result = mf_round_to_tab(font, 0, result);
+ c1 = ' ';
+ continue;
+#else
+ c2 = ' ';
+#endif
+ }
+
if (kern && c1 != 0)
result += mf_compute_kerning(font, c1, c2);