Click to See Complete Forum and Search --> : text to fit in rectangle...


shridhar
April 30th, 1999, 12:51 AM
How do i calculate the font so that
text fits in the given rectangle ??

I mean how do i fill the LOGFONT
structure so that text fits into a
given rectangle ?

Text should get resized ...
it should not clipped.

Dave Lorde
April 30th, 1999, 05:28 AM
Use check the text extent CDC::GetTextExtent() or CDC::GetOutputTextExtent(), setting different font sizes until it fits the available width. You can also use CDC::DrawText to wrap text within a rectangle...

Dave