Got stuck in here with a source font file generated out of arial
size 48
This commit is contained in:
parent
50cc1ad596
commit
509b4113ad
@ -179,6 +179,7 @@ void mf_wordwrap(const struct mf_font_s *font, int16_t width,
|
|||||||
struct linelen_s current = { 0 };
|
struct linelen_s current = { 0 };
|
||||||
struct linelen_s previous = { 0 };
|
struct linelen_s previous = { 0 };
|
||||||
bool full;
|
bool full;
|
||||||
|
uint32_t giveUp = 2048; // Do while-loop a maximum of x times
|
||||||
|
|
||||||
current.start = text;
|
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.space = 0;
|
||||||
current.last_word.chars = 0;
|
current.last_word.chars = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
giveUp--;
|
||||||
|
if (giveUp == 0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dispatch the last lines. */
|
/* Dispatch the last lines. */
|
||||||
|
Loading…
Reference in New Issue
Block a user