Got stuck in here with a source font file generated out of arial size 48

This commit is contained in:
Thomas Sterren 2018-02-20 16:30:53 +01:00
parent 50cc1ad596
commit 509b4113ad

View File

@ -179,6 +179,7 @@ void mf_wordwrap(const struct mf_font_s *font, int16_t width,
struct linelen_s current = { 0 };
struct linelen_s previous = { 0 };
bool full;
uint32_t giveUp = 2048; // Do while-loop a maximum of x times
current.start = text;
@ -214,6 +215,12 @@ void mf_wordwrap(const struct mf_font_s *font, int16_t width,
current.last_word.space = 0;
current.last_word.chars = 0;
}
giveUp--;
if (giveUp == 0)
{
break;
}
}
/* Dispatch the last lines. */