From: Mike Williams on

"sven2000" <sven2000(a)gmail.com> wrote in message
news:72a6c676-4657-4ac3-912e-6249b344f500(a)30g2000yqi.googlegroups.com...

> As it says the ascent includes the internal
> leading . . .

Actually, looking at what I just posted I seemsto have got one of the
numbers just slightly wrong (had so many different windows open here!).
Regarding the details on the MSDN page I was talking about I said . .

> In the example they have used a 16 pixel Arial font and the output
> shows the font size as being 16.00 pixels, the Ascent as being 14.48
> pixels and the Descent as being 3.39 pixels. So, the total of the
> values returned for the Ascent and Descent is 18.19 pixels . .

The sum of 14.48 and 3.39 for the GDI+ (.Nxt) code on that page is of course
17.87 (don't know where I got that 18.19 from!) and that 17.87 is pretty
much exactly the same as the total of the Ascent and Descent as would be
returned by our VB (GDI32) code after allowing for the fact that we cannot
use floating point values (because a ten times larger GDI32 font returns 178
pixels for the sum of Ascent and Descent). So, that shows even more clearly
that Micro$oft are still including the Internal Leading as part of the
Ascent and Descent in GDI+ and .Nxt, just as they do in GDI32, and that they
are still apparently "the odd one out" in the font business. The only real
difference is the fact that the GDI+ (.Nxt) code on the MSDN page also shows
a figure of 18.40 pixels for the total "line spacing" (the distance between
one line of text and the next). That is a difference of 0.53 pixels from the
17.87 sum of Ascent and descent (which includes the Internal Leading) and it
is certainly more than just coincidence (if you check the output from the
VB6 code I posted or if you write your own) that 0.53 pixels is pretty much
exactly what you would expect for the "External Leading" (as opposed to the
"Internal Leading") of a 12 pixel Arial font.

So, clearly Microsoft /do/ still include the Internal Leading in the Ascent
and Descent (and still continue to do so in GDI+ and .Nxt) and the only
difference is that in GDI+ and .Nxt they also include the relatively small
External Leading value in the total line spacing (something which VB6 and
GDI32 does not do).

So, after all that "waffle" in all these messages, the answers to your
supplementary question are:

Yes, Micro$oft /do/ include the Internal Leading within the Ascent in
GDI32, and . .

Yes, they apparently continue to do so in GDI+ and .Nxt, and . .

Yes, they are unusual in that respect ;-)

Mike





From: sven2000 on
Hi Mike, Thanks for the elaborate replies.I've been looking into it a
bit and I found it to confusing. I decided to just print the glyph on
the form and use the point method to scan the glyph for all relevant
metrics and store them in a table.