[SDL] Very quick SDL_TTF question

Josh Matthews mrlachatte at gmail.com
Thu Nov 3 18:27:49 PST 2005

I did my own newline code. I grabbed a word at a time like Bill, and
compared TTF_TextWidth() (or whatever it's called) with the current text
position. If the width of the word was greater, increase the y by
TTF_TextHeight(). Actually, you could probably skip the TextWidth() step and
get the width directly from the blitted text (as long as you have some
proper alpha stuff). Anyways, it's not too hard to figure out.

On 11/3/05, Bill Kendrick <nbs at sonic.net> wrote:
> On Fri, Nov 04, 2005 at 01:40:42AM +0000, James O\'Meara wrote:
> > Is there some way I can get it to print out multiple lines without
> > having to have a different surface for every line? I'd imagine there
> > is, but I don't know what to do.
> Nope! I don't believe so!
> In Tux Paint, I rolled by own word-wrap code. I pretty much blit the
> paragraphs one word at a time.
> --
> -bill!
> bill at newbreedsoftware.com
> http://www.newbreedsoftware.com/
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20051103/91c2b55f/attachment-0008.htm>

More information about the SDL mailing list