From mcufont upstream: Fix tab handling in mf_get_string_width

ugfx_release_2.6
inmarket 2013-07-30 14:20:26 +10:00
parent 99642e2a99
commit db18904892
1 changed files with 11 additions and 0 deletions

View File

@ -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);