I want to render an anti-aliased string on an SDL_Surface with a given alpha channel.
I figured out it is possible to render:
- an anti-aliased string with the
Blendedvariant of the string render method (ie:TTR_RenderText_Blended). But then I can’t make it transparent. - An anti-aliased string with the
Shadedmethod. But then there is a solid background. The background and the drawn string can be made transparent, but then the solid background is still there. Passing it a transparent background color is also not possible. - an non-anti-aliased string, which I can make transparent like I want with the
Solidvariant. But it is not anti-aliased.
Thanks
Why not use bitmapped fonts? You could 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.