SDL_ttf
TTF_RenderUNICODE_Solid
SDL_Surface *TTF_RenderUNICODE_Solid(TTF_Font *font, const char *text, SDL_Color fg)
font
Font to render the text with. Must be non-NULL.
text
- The UTF-8 null-terminated string to render.
fg
- The color to render the text in. This becomes colormap index 1.
Render the UNICODE encoded text using font with fg color onto a new surface, using the Solid mode (see section Solid).
Returns: a pointer to a new SDL_Surface. NULL is returned on errors.
SDL_Surface *text_surface;
if(!(text_surface=TTF_RenderUNICODE_Solid(font,"Hello World!", color))) {
//handle error here, perhaps print TTF_GetError at least
}
See Also
TTF_SizeText, TTF_RenderText_Solid, TTF_RenderUTF8_Solid, TTF_RenderGlyph_Solid, TTF_RenderText_Shaded, TTF_RenderText_Blended
