[SDL] [SDL_ttf] disable kerning or provide a function
Torsten Giebl
wizard at syntheticsw.com
Sat Sep 22 06:50:40 PDT 2007
Hello !
>> Instead of SDL_AllocSurface you would use SDL_CreateRGBSurface and
>> then blit all the chars using SDL_BlitSurface.
>
> OK, thanks a lot!
> (but that's only half of the solution)
Sorry for that. I never used Freetype directly.
Have you looked at the Freetype site for such a function ?
A way would be to check the width and height of each
character you use for each font, size, ... and then save
this information in an array or another data structure.
You can then use SDL_ttf to generate the complete string and
use your information to calculate the necessary position.
For example width & height for "a", width & height for "b"
and then check if width for "a" + width for "b" = width for "ab"
CU
More information about the SDL
mailing list