diff options
author | Joel Bodenmann <joel@embedded.pro> | 2017-02-21 08:50:57 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@embedded.pro> | 2017-02-21 08:50:57 +0100 |
commit | 6956df1652c51eaddf5cd882f7fcde6571b240da (patch) | |
tree | f9a1fceb0eb694999d74c3bfcf065f1a11c4b80d /src/gdisp | |
parent | 35a4e07d66f3e407ea8fb7398204272a20e16adc (diff) | |
download | uGFX-6956df1652c51eaddf5cd882f7fcde6571b240da.tar.gz uGFX-6956df1652c51eaddf5cd882f7fcde6571b240da.tar.bz2 uGFX-6956df1652c51eaddf5cd882f7fcde6571b240da.zip |
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.
Diffstat (limited to 'src/gdisp')
-rw-r--r-- | src/gdisp/mcufont/mf_wordwrap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gdisp/mcufont/mf_wordwrap.c b/src/gdisp/mcufont/mf_wordwrap.c index 4c563c3f..d89b567d 100644 --- a/src/gdisp/mcufont/mf_wordwrap.c +++ b/src/gdisp/mcufont/mf_wordwrap.c @@ -52,6 +52,8 @@ static bool get_wordlen(const struct mf_font_s *font, mf_str *text, if (c == ' ') result->space += mf_character_width(font, c); + else if (c == '-') + result->space += mf_character_width(font, '-'); else if (c == '\t') result->space += mf_character_width(font, 'm') * MF_TABSIZE; else if (c == '\n') |