Discussion:
msdn documentation OUTLINETEXTMETRICS clarification
(too old to reply)
vipin
2004-08-06 08:38:06 UTC
Permalink
Hi,
GetOutlineTextMetrics(...)'s OUTLINETEXTMETRIC has OtmMacAscent and
OtmAscent. But somehow msdn documentation emphasis on using OtmMacAscent and
OtmMacDescent members. I am not sure what's the difference from the other
members, OtmAscent and OtmDescent.

Documentation:-
ms-help://MS.MSDNQTR.2002JAN.1033/gdi/fontext_56yb.htm

Can I get clarity on this documentation here because I do some text analysis
for precise placement
on piece of paper?

thanks
vipin
Christoph Lindemann
2004-08-06 10:23:11 UTC
Permalink
Hi Vipin,

This might be due to the origin of the TrueType format. The TrueType format
is originally defined by Apple.

And the following snip from the library might also be interesting:

"The maximum ascent and descent are different from the typographic ascent
and descent. In TrueType and OpenType fonts, the typographic ascent and
descent are typically the top of the f glyph and bottom of the g glyph. An
application can retrieve the typographic ascender and descender for a **
TrueType or OpenType ** font by calling the GetOutlineTextMetrics function
and checking the values in the otmMacAscent and otmMacDescent members of the
OUTLINETEXTMETRIC structure."

You can find more in the "String Widths and Heights" topic.

Best regards,
Christoph
Post by vipin
Hi,
GetOutlineTextMetrics(...)'s OUTLINETEXTMETRIC has OtmMacAscent and
OtmAscent. But somehow msdn documentation emphasis on using OtmMacAscent and
OtmMacDescent members. I am not sure what's the difference from the other
members, OtmAscent and OtmDescent.
Documentation:-
ms-help://MS.MSDNQTR.2002JAN.1033/gdi/fontext_56yb.htm
Can I get clarity on this documentation here because I do some text analysis
for precise placement
on piece of paper?
thanks
vipin
vipin
2004-08-06 10:48:28 UTC
Permalink
Hello,
You referred me back to the same point I referred "string widths and
heights".

I am not sure though , if you look at the DDK IFIMETRICS you would see
something like this:-
fwdWinAscender and fwdMacAscender and documentation says nothing, also
you have fTypoAscender.

How can I see the variation between them if there exists simultanoeus
members in the IFIMETRICS.
Ofcourse sticking to fwdWinAscender is fine but I am not sure why the win32
msdn documentation mentions
using otmMacAscent.

so we see some redundancy:-

win32 Outlinemetrics DDK IFIMETRICS
otmMacAscent == fwdMacAscender / fTypoAscender

Then my question is why two members fwdMacAscender , fTypoAscender.


thanks
vipin
Post by Christoph Lindemann
Hi Vipin,
This might be due to the origin of the TrueType format. The TrueType format
is originally defined by Apple.
"The maximum ascent and descent are different from the typographic ascent
and descent. In TrueType and OpenType fonts, the typographic ascent and
descent are typically the top of the f glyph and bottom of the g glyph. An
application can retrieve the typographic ascender and descender for a **
TrueType or OpenType ** font by calling the GetOutlineTextMetrics function
and checking the values in the otmMacAscent and otmMacDescent members of the
OUTLINETEXTMETRIC structure."
You can find more in the "String Widths and Heights" topic.
Best regards,
Christoph
Post by vipin
Hi,
GetOutlineTextMetrics(...)'s OUTLINETEXTMETRIC has OtmMacAscent
and
Post by vipin
OtmAscent. But somehow msdn documentation emphasis on using OtmMacAscent
and
Post by vipin
OtmMacDescent members. I am not sure what's the difference from the other
members, OtmAscent and OtmDescent.
Documentation:-
ms-help://MS.MSDNQTR.2002JAN.1033/gdi/fontext_56yb.htm
Can I get clarity on this documentation here because I do some text
analysis
Post by vipin
for precise placement
on piece of paper?
thanks
vipin
Christoph Lindemann
2004-08-06 11:44:52 UTC
Permalink
Hi Vipin,

I think the MacAscender fields are only valid for TrueType and OpenType
fonts, not for bitmap or vector fonts. And for some kind of crossplatform
help/whatever.
Are the fwdWinAscender and fwdMacAscender values different, if they bot
exist?
I would think they would be
fwdMacAscender == fwdWinAscender;
fwdMacDescender == - fwdWinDescender;

/christoph
Post by vipin
Hello,
You referred me back to the same point I referred "string widths and
heights".
I am not sure though , if you look at the DDK IFIMETRICS you would see
something like this:-
fwdWinAscender and fwdMacAscender and documentation says nothing, also
you have fTypoAscender.
How can I see the variation between them if there exists simultanoeus
members in the IFIMETRICS.
Ofcourse sticking to fwdWinAscender is fine but I am not sure why the win32
msdn documentation mentions
using otmMacAscent.
so we see some redundancy:-
win32 Outlinemetrics DDK IFIMETRICS
otmMacAscent == fwdMacAscender / fTypoAscender
Then my question is why two members fwdMacAscender , fTypoAscender.
thanks
vipin
Post by Christoph Lindemann
Hi Vipin,
This might be due to the origin of the TrueType format. The TrueType
format
Post by Christoph Lindemann
is originally defined by Apple.
"The maximum ascent and descent are different from the typographic ascent
and descent. In TrueType and OpenType fonts, the typographic ascent and
descent are typically the top of the f glyph and bottom of the g glyph. An
application can retrieve the typographic ascender and descender for a
**
Post by vipin
Post by Christoph Lindemann
TrueType or OpenType ** font by calling the GetOutlineTextMetrics function
and checking the values in the otmMacAscent and otmMacDescent members of
the
Post by Christoph Lindemann
OUTLINETEXTMETRIC structure."
You can find more in the "String Widths and Heights" topic.
Best regards,
Christoph
Post by vipin
Hi,
GetOutlineTextMetrics(...)'s OUTLINETEXTMETRIC has
OtmMacAscent
Post by vipin
Post by Christoph Lindemann
and
Post by vipin
OtmAscent. But somehow msdn documentation emphasis on using OtmMacAscent
and
Post by vipin
OtmMacDescent members. I am not sure what's the difference from the
other
Post by Christoph Lindemann
Post by vipin
members, OtmAscent and OtmDescent.
Documentation:-
ms-help://MS.MSDNQTR.2002JAN.1033/gdi/fontext_56yb.htm
Can I get clarity on this documentation here because I do some text
analysis
Post by vipin
for precise placement
on piece of paper?
thanks
vipin
vipin
2004-08-06 12:25:17 UTC
Permalink
ofcourse I am talking of trutype/opentype fonts. I would like Microsoft to
verify this probably from their proprietary code and tell what they mean
exactly by them.whether there is a difference among them and whats the
history behind the probable confusion.
Post by Christoph Lindemann
Hi Vipin,
I think the MacAscender fields are only valid for TrueType and OpenType
fonts, not for bitmap or vector fonts. And for some kind of crossplatform
help/whatever.
Are the fwdWinAscender and fwdMacAscender values different, if they bot
exist?
I would think they would be
fwdMacAscender == fwdWinAscender;
fwdMacDescender == - fwdWinDescender;
/christoph
Post by vipin
Hello,
You referred me back to the same point I referred "string widths
and
Post by vipin
heights".
I am not sure though , if you look at the DDK IFIMETRICS you would see
something like this:-
fwdWinAscender and fwdMacAscender and documentation says nothing, also
you have fTypoAscender.
How can I see the variation between them if there exists simultanoeus
members in the IFIMETRICS.
Ofcourse sticking to fwdWinAscender is fine but I am not sure why the
win32
Post by vipin
msdn documentation mentions
using otmMacAscent.
so we see some redundancy:-
win32 Outlinemetrics DDK IFIMETRICS
otmMacAscent == fwdMacAscender / fTypoAscender
Then my question is why two members fwdMacAscender , fTypoAscender.
thanks
vipin
Post by Christoph Lindemann
Hi Vipin,
This might be due to the origin of the TrueType format. The TrueType
format
Post by Christoph Lindemann
is originally defined by Apple.
"The maximum ascent and descent are different from the typographic
ascent
Post by vipin
Post by Christoph Lindemann
and descent. In TrueType and OpenType fonts, the typographic ascent and
descent are typically the top of the f glyph and bottom of the g
glyph.
Post by Christoph Lindemann
An
Post by vipin
Post by Christoph Lindemann
application can retrieve the typographic ascender and descender for a
**
Post by vipin
Post by Christoph Lindemann
TrueType or OpenType ** font by calling the GetOutlineTextMetrics
function
Post by vipin
Post by Christoph Lindemann
and checking the values in the otmMacAscent and otmMacDescent members of
the
Post by Christoph Lindemann
OUTLINETEXTMETRIC structure."
You can find more in the "String Widths and Heights" topic.
Best regards,
Christoph
Post by vipin
Hi,
GetOutlineTextMetrics(...)'s OUTLINETEXTMETRIC has
OtmMacAscent
Post by vipin
Post by Christoph Lindemann
and
Post by vipin
OtmAscent. But somehow msdn documentation emphasis on using
OtmMacAscent
Post by vipin
Post by Christoph Lindemann
and
Post by vipin
OtmMacDescent members. I am not sure what's the difference from the
other
Post by Christoph Lindemann
Post by vipin
members, OtmAscent and OtmDescent.
Documentation:-
ms-help://MS.MSDNQTR.2002JAN.1033/gdi/fontext_56yb.htm
Can I get clarity on this documentation here because I do some text
analysis
Post by vipin
for precise placement
on piece of paper?
thanks
vipin
John Eikanger [MSFT]
2004-08-06 21:14:23 UTC
Permalink
Hi, Vipin

An escalation has been created to handle this issue at the request of the
GDI tech lead. You should receive a response in this newsgroup in the
first part of next week.

Thank you for choosing the MSDN Managed Newsgroups,

John Eikanger
Microsoft Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.
--------------------
| From: "vipin" <***@nospam.com>
| Subject: Re: msdn documentation OUTLINETEXTMETRICS clarification
| Date: Fri, 6 Aug 2004 17:55:17 +0530
| X-Tomcat-NG: microsoft.public.win32.programmer.gdi
|
| ofcourse I am talking of trutype/opentype fonts. I would like Microsoft to
| verify this probably from their proprietary code and tell what they mean
| exactly by them.whether there is a difference among them and whats the
| history behind the probable confusion.
|
| "Christoph Lindemann" <***@newsgroups.nospam> wrote in message
| news:#***@TK2MSFTNGP10.phx.gbl...
| > Hi Vipin,
| >
| > I think the MacAscender fields are only valid for TrueType and OpenType
| > fonts, not for bitmap or vector fonts. And for some kind of
crossplatform
| > help/whatever.
| > Are the fwdWinAscender and fwdMacAscender values different, if they bot
| > exist?
| > I would think they would be
| > fwdMacAscender == fwdWinAscender;
| > fwdMacDescender == - fwdWinDescender;
| >
| > /christoph
| >
| > "vipin" <***@nospam.com> wrote in message
| > news:***@tk2msftngp13.phx.gbl...
| > > Hello,
| > > You referred me back to the same point I referred "string
widths
| > and
| > > heights".
| > >
| > > I am not sure though , if you look at the DDK IFIMETRICS you would
see
| > > something like this:-
| > > fwdWinAscender and fwdMacAscender and documentation says nothing,
| also
| > > you have fTypoAscender.
| > >
| > > How can I see the variation between them if there exists simultanoeus
| > > members in the IFIMETRICS.
| > > Ofcourse sticking to fwdWinAscender is fine but I am not sure why the
| > win32
| > > msdn documentation mentions
| > > using otmMacAscent.
| > >
| > > so we see some redundancy:-
| > >
| > > win32 Outlinemetrics DDK IFIMETRICS
| > > otmMacAscent == fwdMacAscender / fTypoAscender
| > >
| > > Then my question is why two members fwdMacAscender , fTypoAscender.
| > >
| > >
| > > thanks
| > > vipin
| > >
| > > "Christoph Lindemann" <***@newsgroups.nospam> wrote in message
| > > news:#***@TK2MSFTNGP10.phx.gbl...
| > > > Hi Vipin,
| > > >
| > > > This might be due to the origin of the TrueType format. The TrueType
| > > format
| > > > is originally defined by Apple.
| > > >
| > > > And the following snip from the library might also be interesting:
| > > >
| > > > "The maximum ascent and descent are different from the typographic
| > ascent
| > > > and descent. In TrueType and OpenType fonts, the typographic ascent
| and
| > > > descent are typically the top of the f glyph and bottom of the g
| glyph.
| > An
| > > > application can retrieve the typographic ascender and descender for
a
| > **
| > > > TrueType or OpenType ** font by calling the GetOutlineTextMetrics
| > function
| > > > and checking the values in the otmMacAscent and otmMacDescent
members
| of
| > > the
| > > > OUTLINETEXTMETRIC structure."
| > > >
| > > > You can find more in the "String Widths and Heights" topic.
| > > >
| > > > Best regards,
| > > > Christoph
| > > >
| > > >
| > > > "vipin" <***@nospam.com> wrote in message
| > > > news:***@TK2MSFTNGP11.phx.gbl...
| > > > > Hi,
| > > > > GetOutlineTextMetrics(...)'s OUTLINETEXTMETRIC has
| > OtmMacAscent
| > > > and
| > > > > OtmAscent. But somehow msdn documentation emphasis on using
| > OtmMacAscent
| > > > and
| > > > > OtmMacDescent members. I am not sure what's the difference from
the
| > > other
| > > > > members, OtmAscent and OtmDescent.
| > > > >
| > > > > Documentation:-
| > > > > ms-help://MS.MSDNQTR.2002JAN.1033/gdi/fontext_56yb.htm
| > > > >
| > > > > Can I get clarity on this documentation here because I do some
text
| > > > analysis
| > > > > for precise placement
| > > > > on piece of paper?
| > > > >
| > > > > thanks
| > > > > vipin
| > > > >
| > > > >
| > > >
| > > >
| > >
| > >
| >
| >
|
|
|
David
2004-08-10 01:20:14 UTC
Permalink
Hi Vipin,

Thank you for your questions. I have asked our font Dev team for input,
since there is a conflict in our documentation. In my testing, it appears
that otmMacAscent and otmMacDescent are correct, and otmAscent and
otmDescent are not. The documentation conflict is as follows...

Our documentation for OUTLINETEXTMETRIC
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontex
t_569e.asp) states the following (my ***'s)...

otmAscent
Specifies the maximum distance characters in this font extend above the
base line. ***This is the typographic ascent for the font***.
otmDescent
Specifies the maximum distance characters in this font extend below the
base line. ***This is the typographic descent for the font***.
otmMacAscent
Specifies the maximum distance characters in this font extend above the
base line for the Macintosh computer.
otmMacDescent
Specifies the maximum distance characters in this font extend below the
base line for the Macintosh computer.


This contradicts what our documentation says elsewhere
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontex
t_56yb.asp)...(my ***'s)...

Font Ascenders and Descenders
Some applications determine the line spacing between text lines of
different sizes by using a font's maximum ascender and descender. An
application can retrieve these values by calling the GetTextMetrics
function and then checking the tmAscent and tmDescent members of the
TEXTMETRIC.
The maximum ascent and descent are different from the typographic ascent
and descent. In TrueType and OpenType fonts, the typographic ascent and
descent are typically the top of the f glyph and bottom of the g glyph.
***An application can retrieve the typographic ascender and descender for a
TrueType or OpenType font by calling the GetOutlineTextMetrics function and
checking the values in the otmMacAscent and otmMacDescent members of the
OUTLINETEXTMETRIC structure.***

Again, the later documentation above appears to be correct based on my
testing so far. I am still running tests and as I mentioned, I am awaiting
input from our font Dev team. I will keep you posted, but let me know if
you have any questions or concerns at this point.

Regards,
Dave Wooden
Microsoft Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.
vipin
2004-08-10 07:29:05 UTC
Permalink
Hi David,
Thanks for the response. I will look forward to the
information you come up with.I would
stick up with *Mac* values for the time being till everything clears up.
thanks
vipin
Post by Christoph Lindemann
Hi Vipin,
Thank you for your questions. I have asked our font Dev team for input,
since there is a conflict in our documentation. In my testing, it appears
that otmMacAscent and otmMacDescent are correct, and otmAscent and
otmDescent are not. The documentation conflict is as follows...
Our documentation for OUTLINETEXTMETRIC
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontex
Post by Christoph Lindemann
t_569e.asp) states the following (my ***'s)...
otmAscent
Specifies the maximum distance characters in this font extend above the
base line. ***This is the typographic ascent for the font***.
otmDescent
Specifies the maximum distance characters in this font extend below the
base line. ***This is the typographic descent for the font***.
otmMacAscent
Specifies the maximum distance characters in this font extend above the
base line for the Macintosh computer.
otmMacDescent
Specifies the maximum distance characters in this font extend below the
base line for the Macintosh computer.
This contradicts what our documentation says elsewhere
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontex
Post by Christoph Lindemann
t_56yb.asp)...(my ***'s)...
Font Ascenders and Descenders
Some applications determine the line spacing between text lines of
different sizes by using a font's maximum ascender and descender. An
application can retrieve these values by calling the GetTextMetrics
function and then checking the tmAscent and tmDescent members of the
TEXTMETRIC.
The maximum ascent and descent are different from the typographic ascent
and descent. In TrueType and OpenType fonts, the typographic ascent and
descent are typically the top of the f glyph and bottom of the g glyph.
***An application can retrieve the typographic ascender and descender for a
TrueType or OpenType font by calling the GetOutlineTextMetrics function and
checking the values in the otmMacAscent and otmMacDescent members of the
OUTLINETEXTMETRIC structure.***
Again, the later documentation above appears to be correct based on my
testing so far. I am still running tests and as I mentioned, I am awaiting
input from our font Dev team. I will keep you posted, but let me know if
you have any questions or concerns at this point.
Regards,
Dave Wooden
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no
rights.
David
2004-08-11 22:21:09 UTC
Permalink
Hi Vipin,

This is a bug in our documentation and I have confirmed that otmMacAscent
and otmMacDescent are the appropriate fields to use. I have informed our
documentation folks of the errors and obvious inconsistencies.

You will also find that (abs(otmMacAscent) + abs(otmMacDescent)) gives you
the same value that TEXTMETRIC.tmHeight gives you. Also, otmMacAscent ==
TEXTMETRIC.tmAscent. and. abs(otmMacDescent) == TEXTMETRIC.tmDescent.

How are you currently trying to do precise text placement? It is generally
difficult if you are using Win32 since the Windows font rasterizer can
scale things for readability, making the raw metrics inconsistent with the
actual output.

Again, please use otmMacAscent and otmMacDescent if the typographic
ascender and descender are needed. The documentation at
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontex
t_56yb.asp) is correct. Let me know if you have any questions.

Regards,
Dave Wooden
Microsoft Developer Support

This posting is provided AS IS with no warranties, and confers no rights.
vipin
2004-08-12 12:05:27 UTC
Permalink
Thanks, I will have to try something and will get back soon.
Post by Christoph Lindemann
Hi Vipin,
This is a bug in our documentation and I have confirmed that otmMacAscent
and otmMacDescent are the appropriate fields to use. I have informed our
documentation folks of the errors and obvious inconsistencies.
You will also find that (abs(otmMacAscent) + abs(otmMacDescent)) gives you
the same value that TEXTMETRIC.tmHeight gives you. Also, otmMacAscent ==
TEXTMETRIC.tmAscent. and. abs(otmMacDescent) == TEXTMETRIC.tmDescent.
How are you currently trying to do precise text placement? It is generally
difficult if you are using Win32 since the Windows font rasterizer can
scale things for readability, making the raw metrics inconsistent with the
actual output.
Again, please use otmMacAscent and otmMacDescent if the typographic
ascender and descender are needed. The documentation at
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontex
Post by Christoph Lindemann
t_56yb.asp) is correct. Let me know if you have any questions.
Regards,
Dave Wooden
Microsoft Developer Support
This posting is provided AS IS with no warranties, and confers no rights.
vipin
2004-08-18 06:45:42 UTC
Permalink
This post might be inappropriate. Click to display it.
Yan-Hong Huang[MSFT]
2004-08-18 10:01:28 UTC
Permalink
Hi Vipin,

We are glad to know that otmMac* are fine now. If you have any more
concerns on it, please feel free to reply here and we will follow up.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! šC www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
Loading...