diff options
author | Bastien Bouclet | 2018-08-02 07:09:26 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-08-03 22:35:16 +0200 |
commit | 7362060c47f5136ba8ea3cd617ef957057ac4296 (patch) | |
tree | 271a45846a267568b27b644ab2d25ca32a2c6b5d /dists/wii | |
parent | f2049d4d1ece374cbd203350190c19da2b4b58c4 (diff) | |
download | scummvm-rg350-7362060c47f5136ba8ea3cd617ef957057ac4296.tar.gz scummvm-rg350-7362060c47f5136ba8ea3cd617ef957057ac4296.tar.bz2 scummvm-rg350-7362060c47f5136ba8ea3cd617ef957057ac4296.zip |
GRAPHICS: Improve check to test if text fits in the target surface
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.
Diffstat (limited to 'dists/wii')
0 files changed, 0 insertions, 0 deletions