Announcing SDL_ttf 2.0.3

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/

This is the version of the library that’s used in the upcoming
Sid Meier’s Alpha Centauri 6.0a patch from Loki!

I’ll build MacOS and BeOS libraries as soon as I figure out how
to build FreeType 2.0 in those environments. :slight_smile:

Enjoy!
-Sam Lantinga, Lead Programmer, Loki Software, Inc.

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.

it looks like the blended has RGBA/ABGR issues? (tested on celeron)

it seems that it still has the bad rgba mask code. I think I wrote a
patch for it

ah, here it is: http://mail.lokigames.com/ml/sdl/13958.html

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.

Well, it could be the case the font does have a bad kerning
information. But, maybe a bug of freetype2.x renderer.

i also noticed the underline has moved. not a problem, but just
a difference (if anyone cares)

Looks better now.

best regards

STanOn Thu, 21 Jun 2001, Pete Shinners wrote: