Check out the Graphics.MeasureString() method for measuring your text.
And for smoothing, check out the Graphics.SmoothingMode property.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
<> wrote in message
news: oups.com...
> There are a lot of examples out there, but I was hoping something could
> help me further. I'd like to draw text (unknown length) to an image,
> but then crop the image to the height and width of the text. Is this
> possible?
>
> I'm guessing I can get the height from the Font.Height property. But
> how do I go about getting the width of the drawn text?
>
> Also, are there any tip for drawing fairly smooth fonts?
>
> Thanks,
>
> Jason
>
|