I just started using SDL2_ttf
. I've figured out how to get some text on the screen with TTF_RenderText_Blended
, but how do can I get it to do line-breaks and automatic wrapping?
- It doesn't seem to support
\n
; it just creates a space instead of going down a line. Is there a way to add support for this? Specifically, using the proper line-height of the text, not by multiple calls to RenderText at different Y coordinates. - Given an X, Y coordinate and a width, how can I have it automatically go down a line whenever that width is reached (breaking between words)?