Page 1 of 1

GetFontHeight - DrawFontWrap question

PostPosted: Mar 18, 2008 @ 8:29pm
by yucani
Is it possible to find out the height and width of a text drawn by DrawFontWrap on a screen? If yes, wich font is used to calculate?

PostPosted: Mar 20, 2008 @ 10:13am
by edge

i tried and this are my results:

PostPosted: Mar 21, 2008 @ 10:17am
by yucani
after creating the font , i run following code:

char dst[89], src[89];
ulong w,h;
estrcpy(src,"alles wird gut, und noch viel besser");
font.PrepareFontWrap(dst, src, 100);
h=font.GetFontHeight(src);
w=font.GetFontWidth(src);

the results:
alles wird gut, und
noch viel besser
w=167
h=12

so the GetFontWidth ignores the wrap, but after counting the CR in the dest string one is able to find out the real hight.
Does i understand the procedure correct?

PostPosted: Mar 21, 2008 @ 11:11am
by edge