[SDN_ttf] incorrect calculation of line spacing? |
Andras Salamon
Guest
|
Not sure this is the right place for SDL_ttf issues, but if so:
Current SDL_ttf (http://www.libsdl.org/cgi/cvsweb.cgi/SDL_ttf2/) seems to calculate bounding boxes based on the maximum and minimum values that appear in the font, as opposed to the used glyphs only. This means that fonts containing some of the Unicode Block Elements will generally cause SDL_ttf to use very large line spacing, even if the Block Elements are not actually being used in the application. http://www.unicode.org/charts/PDF/U2580.pdf
I have tested this suggested change with DejaVuSans 2.1 and after this tweak, SDL_ttf now renders this font correctly in our application (Battle for Wesnoth, http://www.wesnoth.org/). Please consider this change for SDL_ttf. (Stepan also had some other comments, see http://sourceforge.net/mailarchive/message.php?msg_id=13151599 for his full message. The change above is the most generally relevant.) -- Andras Salamon andras at dns.net |
|||||||||||||
|
[SDN_ttf] incorrect calculation of line spacing? |
Sam Lantinga
Guest
|
I've entered this bug into Bugzilla: https://bugzilla.libsdl.org/show_bug.cgi?id=51 Can anyone comment on the results of this approach, and whether it will work in general? Thanks! -Sam Lantinga, Senior Software Engineer, Blizzard Entertainment |
|||||||||||||
|