SDL_ttf

SDL_ttf > Functions > Render

TTF_RenderUTF8_Solid

SDL_Surface *TTF_RenderUTF8_Solid(TTF_Font *font, const char *text, SDL_Color fg)

font

text

fg

Render the UTF8 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_RenderUTF8_Solid(font,"Hello World!", color))) {
        //handle error here, perhaps print TTF_GetError at least
}

See Also

TTF_SizeText, TTF_RenderText_Solid, TTF_RenderUNICODE_Solid, TTF_RenderGlyph_Solid, TTF_RenderText_Shaded, TTF_RenderText_Blended

SDL_ttf_copy/Functions/Render/TTF_RenderUTF8_Solid (last edited 2009-02-25 23:12:18 by sign-4d0949c8)