views:

23

answers:

1

Hi,

This is a many discussed topic. But after searching for hours, I still could find how to do it...

So, what I want is to render an anti-alias string on an SDL_Surface with a given alpha channel.

It is possible to render:

  • an anti-alias string with the Blended variant of the string render method. But then I can't make it transparent.
  • An anti-alias string with the Shaded method. But then there is a solid background. The background and the drawn string can be created transparent, but then the solid background is still there. Giving a transparent background color is also not possible.
  • an non-anti-aliased string, which I can make transparent like I want with the Solid variant. But it is not transparent.

Thanks

A: 

Why not use bitmapped fonts? With sfont (and many other utilities) you can build a png image with alpha channel. I think that SDL_ttf works with the same system, it builds an image an internally uses bitmapped fonts.

Victor Marzo