Re: DrawText DrawText msdn documentation clarification
From: Sigurd Stenersen (sigurds_at_utvikling.com)
Date: 08/31/04
- Next message: vipin: "Re: DrawText DrawText msdn documentation clarification"
- Previous message: vipin: "Re: Charmap inconsistent behaviour"
- In reply to: vipin: "Re: DrawText DrawText msdn documentation clarification"
- Next in thread: vipin: "Re: DrawText DrawText msdn documentation clarification"
- Reply: vipin: "Re: DrawText DrawText msdn documentation clarification"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 31 Aug 2004 12:03:47 +0200
vipin wrote:
> "Rhett Gong [MSFT]" <v-raygon@online.microsoft.com> wrote in message
>> It depends on the font used, among other things.
>>
>> I also add the output for rect.botton. In my test, I get the same
>> output (see below) no matter I use "Hello Windows 98!" or "Hegpo
>> Windows 98!" //-------------------------------------------------
>> rect.bottom is: 116
>> Return value from DrawText is: 16
>> //-------------------------------------------------
>> Do you mean the return value should be less than 16 when drawing
>> "Hello Windows 98!", since it doesn't rest on the bottom of the rect?
>>
> Exactly, I expected the return code to be less for
> "Hello Windows 98!".
>
> So I assume it is some problem with the API.
There is no problem with the API, it's your understanding of it that's off.
If text was aligned like you suggest, it would be next to impossible to make
a straight line of text by several calls to DrawText().
The alignment does of course depend on the font being used, but no sensibly
designed font wastes any space - unless it's called for. There is internal
and external leading, tho, to improve readability.
Some characters generally use more space under the baseline than others, but
the fact that a given character doesn't *use* that space does not mean that
that space isn't there...
You'll find a lot of information about fonts etc at msdn, for instance
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_56yb.asp
-- Sigurd http://utvikling.com
- Next message: vipin: "Re: DrawText DrawText msdn documentation clarification"
- Previous message: vipin: "Re: Charmap inconsistent behaviour"
- In reply to: vipin: "Re: DrawText DrawText msdn documentation clarification"
- Next in thread: vipin: "Re: DrawText DrawText msdn documentation clarification"
- Reply: vipin: "Re: DrawText DrawText msdn documentation clarification"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|