SDL_ttf is a library for displaying TrueType fonts in SDL applications.
It’s finally here, SDL_ttf has been updated for FreeType 2.0!
http://www.libsdl.org/projects/SDL_ttf/
not sure if you have an updated archive around, but here’s
how i found things in the .TAR.GZ you posted recently
( http://www.libsdl.org/cvs/SDL_ttf-2.0.3.tar.gz )
no visualc.zip. it sounds like you already have compiled this
under windows, so i’m guessing you already have something like
this lying around?
the readme file still mentions it uses freetype-1.2
as far as the testing goes, i’ve noticed a couple differences
between old SDL_ttf and new SDL_ttf. take a look at this picture
here… http://www.pygame.org/ftp/contrib/fontytest.gif
ok, this is using my pygame library, but here is a breakdown
of what you are seeing. obviously each text has a different
style enabled (none, underline, bold, italic). the two left
words are rendered with RenderText_Solid. the topright is
RenderText_Shaded, and the bottomright is RenderText_Blended.
it looks like the blended has RGBA/ABGR issues? (tested on celeron)
the kerning looks messy when italic is enabled. i did some
further testing and found this problem occurs with other
TTF fonts, it’s just more noticeable with my testing one.
i know freetype2 supports kerning. can SDL_ttf just always
enable kerning when it renders the text? it will make the
letter spacing more pleasent for fonts that have the kerning
information.
i also noticed the underline has moved. not a problem, but just
a difference (if anyone cares)
there are a couple improvements though.
first, the blended and smoothed text looks a lot smoother. very
nice. this is because freetype1.x only had 4 or so values of
smoothing, whereas freetype2.x uses a full 255 values (i think)
also, not shown in these images, but we can now render fonts
with RenderText_Blended and have the underline enabled and not
dump core. hooray. i was kind of hoping that would get fixed
with the big new version. just tested that and it does work!
whew, and there is my 30 minute review of the new SDL_ttf
library.