Re: ascender, descender, cap-height and x-height

> >it immediately reminded me of Windows's
> >rather peculiar negative lfHeight thing. I mean, who would normally
> >specify a negative number for a height?
> 
> The positive size is the point size, where the system
> calculates ppem size (pixels per em - there you have the em again).
> The ppem size is typically 96/72*point-size for the screen,
> because Windows uses a "logical" resolution of 96 pixels
> per Inch, while there are 72 points in an Inch.
> 
> The negative size can be used to specify ppem size
> directly. Useful for screen typography where you do not want
> to be interfered with by the fact that the screen resolution
> isn't always set to the same value.
> 
> For +12 this gives an em of 16 by 16 pixels
> For -12 an em of 12 by 12 pixels.
> (regardless of the width of the M ;-)

Are you sure about this? The Windows documentation does not appear to
agree with you. The main page is at:

  http://msdn.microsoft.com/library/

You can navigate to the relevant docs via the following steps (on the
left):

  Platform SDK
  Graphics and Multimedia Services
  Windows GDI
  Font and Text
  Font and Text Reference
  Font and Text Structures
  LOGFONT

Here is the Web page, if you want to go directly:

  http://msdn.microsoft.com/library/psdk/gdi/fontext_1wmq.htm

It says that positive lfHeight is for the "cell height", while negative
lfHeight is for "character height". It also says:

  The character height value (also known as the em height) is the
  character cell height value minus the internal-leading value.

Here is a Web page showing a picture of internal leading:

  http://msdn.microsoft.com/library/psdk/gdi/fontext_56yb.htm

The following states that the internal leading area may contain accents,
and that the external leading area does not contain any marks:

  http://msdn.microsoft.com/library/psdk/gdi/fontext_2zqq.htm

The points vs pixels issue that you mentioned is actually set by a
different API called SetMapMode:

  http://msdn.microsoft.com/library/psdk/gdi/cordspac_3c6d.htm

The MM_TEXT mode is for pixels, while the MM_TWIPS mode is for
twentieths (1/20) of a point. So, in the MM_TEXT mode, both positive and
negative lfHeight are in pixels. It's just that positive lfHeight sets
the "cell height", while negative lfHeight sets the "character height".

Would anyone from Microsoft care to comment on the history of lfHeight?

Erik

Received on Saturday, 5 February 2000 14:29:19 UTC