Font.render

Wraps TTF_RenderUNICODE_Solid, TTF_RenderUNICODE_Shaded, TTF_RenderUNICODE_Blended, and additionally TTF_RenderUNICODE_LCD (from SDL_ttf 2.20), as well as TTF_RenderUNICODE_Solid_Wrapped, TTF_RenderUNICODE_Shaded_Wrapped, TTF_RenderUNICODE_Blended_Wrapped (from SDL_ttf 2.0.18), and TTF_RenderUNICODE_LCD_Wrapped (from SDL_ttf 2.20) to render a text string in the dsdl2.ttf.Font

Parameters

text wstring

wstring text to render

foreground Color

foreground dsdl2.Color of the text

background Color

background dsdl2.Color of the resulted surface (only for RenderQuality.shaded and RenderQuality.lcd)

quality RenderQuality

dsdl2.ttf.RenderQuality of the resulted render

wrapLength uint

maximum width in pixels for wrapping text to the new line; 0 to only wrap on line breaks (wrapping only available from SDL_ttf 2.0.18)

Return Value

Type: Surface

dsdl2.Surface containing the rendered text

Throws

dsdl.SDLException if failed to render text

Meta