How to squash SDL_ttf text into a fixed width surface?

Since I only need that for SDL_ttf text I’m thinking of getting the text already shrunk from SDL_ttf, instead of re-render the surface returned by SDL_ttf.
I’ll?try to have a look in SDL_ttf, maybe I can use a factor (based?on the surface width) and force the text into the box while it’s ploting. But I’m not familiar with SDL_ttf. Can anyone point me to the right functions?
?
thanks
Phuoc
?
?
/_/_/_/_/_/_ www.huaonline.com My Homepage is my Castle— On Sun, 21/12/08, Neil White wrote:

From: neil@cloudsprinter.com (Neil White)
Subject: Re: [SDL] How to blit a Surface and shrink it?
To: home at huaonline.com, “A list for developers using the SDL library. (includes SDL-announce)”
Received: Sunday, 21 December, 2008, 11:35 PM

-----Inline Attachment Follows-----

a bit ambiguous question assuming my grasp on english

assuming i know what you are on about-

if you put the text all into a surface of its own then checked to see if the surtface was wider that your display, if np then plot normally, if yes use sdlgfx to shrink the width of the text surface to the witdh of the display surface then plot.

  Stay connected to the people that matter most with a smarter inbox. Take a look http://au.docs.yahoo.com/mail/smarterinbox

What I did with Tux Paint was to rescale the surface I got back from SDL_ttf,
to ensure that it fits. This really should be a last resort for places
where you’re trying to do a good UI (compared to word-wrapping and resizing
your UI elements). :slight_smile:

-bill!On Sun, Dec 21, 2008 at 05:05:54PM -0800, Phuoc Can Hua wrote:

Since I only need that for SDL_ttf text I’m thinking of getting the text
already shrunk from SDL_ttf, instead of re-render the surface returned by
SDL_ttf.