- Fix last chars being eaten
- Add support for input in right-align mode editables
- Fix issue with dirtyness of editables after clicking
- Improve spacing for lists and popup
- Make numbers reversed in lists
The new arguments are optional. The lines segments will be close to the same width.
The algorithm is similar to the one we had for Blade Runner but not exactly the same, since that one would wrap a line at a white space after the theoretical split point (quotient of full line text width divided by target lines number)
When rendering text, especially truetype fonts, we would use the next
character avance metric to check if the character fits in the target
surface. This commit changes it to use the bounding box metric. The
bounding box represents the actual pixels that will be touched when
drawing the character.
This fixes an issue noticed on the main menu of Myst ME where the last
character of the string "OPTIONEN" would not be rendered despite there
being enough room to render it. More precisely, this ensures that
calling Font::getBoundingBox for a string, and then passing a surface
exactly the size of the returned bounding box to the draw function
actually renders all the characters.
This seems like the right place to do it. Hopefully it's also the
right way. It fixes line breaks in the MacVenture engine, where the
text apparently uses Mac line breaks.
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
This adapts the related graphics code, which is the generic Font API and the
TTF font implementation.
It furthermore adapts the GUI to properly take care of kerning in text input
widgets.
The bounding boxes of the glyphs use signed coordinates. We stored only
unsigned coordinates, which resulted in incorrect glyph positioning.
Conrecte example: the bounding box of the glyphs for clR6x12-iso-8859-5.bdf
used:
x y w h
0 -3 6 12
We on the other hand interpreted that as:
x y w h
0 65533 6 12
when loading the font from our font cache.
svn-id: r51586
This removes the dependency on array.h from str.h.
Also, begun migration from the confusing type name "StringList" to
the more appropriate StringArray.
svn-id: r48282