Currently the final word of wrapped text will always appear as a single
word on its own line. Fix this by rearranging the break cases to avoid
searching for the most recent space when we get to the end of the text.
Fixes: #230
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
wasp-os uses an drawing optimization technique to automatically place
a single pixel line on the right of glyphs when rendering them. This
results in a change to the bounding box for a rendered string (by adding
a single pixel on the right of the final character). Fix the bounding box
calculations accordingly. Among other things this eliminates graphical
artifacts when rendering labels in 2048.
Fixes: #203
Fixes: 58b5c0378e ("draw565: Optimize the string drawing")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Add functions to generate shades from a single (usually theme provided)
basic palette colour.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>