Fixing an issue with word wrapping of strings containing dashes.
Strings do get wrapper correctly at dashes but the space to print the actual space has not been taken account of. This has now been fixed.
This commit is contained in:
parent
35a4e07d66
commit
6956df1652
1 changed files with 2 additions and 0 deletions
|
@ -52,6 +52,8 @@ static bool get_wordlen(const struct mf_font_s *font, mf_str *text,
|
||||||
|
|
||||||
if (c == ' ')
|
if (c == ' ')
|
||||||
result->space += mf_character_width(font, c);
|
result->space += mf_character_width(font, c);
|
||||||
|
else if (c == '-')
|
||||||
|
result->space += mf_character_width(font, '-');
|
||||||
else if (c == '\t')
|
else if (c == '\t')
|
||||||
result->space += mf_character_width(font, 'm') * MF_TABSIZE;
|
result->space += mf_character_width(font, 'm') * MF_TABSIZE;
|
||||||
else if (c == '\n')
|
else if (c == '\n')
|
||||||
|
|
Loading…
Add table
Reference in a new issue