chickadee » sdl2-ttf » render-unicode-solid

render-unicode-solid font unicode fgprocedure
render-unicode-solid* font unicode fgprocedure

Render the given 16-bit Unicode encoded text using "solid" rendering mode. See TTF_RenderUNICODE_Solid.

  • font must be a ttf:font specifying the font to render with.
  • unicode must be a pointer or locative to a null-terminated C array of 16-bit unsigned integers, representing Unicode text. (SRFI-4 u16vectors can be wrapped in a locative using make-locative.)
  • fg must be a sdl2:color specifying the foreground color, i.e. the color of the text itself.

Returns a sdl2:surface containing the rendered text. Signals an exception of kind (exn sdl2) if an error occurred.

  • render-unicode-solid returns a managed sdl2:surface.
  • render-unicode-solid* returns an unmanaged sdl2:surface, which must be freed with free-surface! (from the sdl2 egg) when you are done with it.