PDA

View Full Version : Another SDL_ttf question about newlines



MoxJet
August 12th, 2006, 08:14 AM
Hello,

Is there a way to get get newlines in the surfaces generated from the TTF_RenderText_... commands? All I get is a little "unknown character square" when I try \n.

Would be nice instead of using a new command for every line.

Thanks in advance,
Dan

GeoMX
August 13th, 2006, 04:56 PM
No, SDL_ttf does not recognize new lines chars. You should write your own function for doing so.

You can have a look at the example in this article:
http://www.gamedev.net/reference/articles/article1960.asp

Best wishes,
JJ Enríquez.