Important: The information in this document is obsolete and should not be used for new development.
GetFontInfo
TheGetFontInfo
procedure returns information about the current graphics port's font, taking into account the style and size in which the glyphs are to be drawn.
PROCEDURE GetFontInfo (VAR info: FontInfo);
info
- A font information record that contains the font measurement information, in integer values.
DESCRIPTION
TheGetFontInfo
procedure returns the ascent, descent, leading, and width of the largest glyph of the font in the text font, size, and style specified in the current graphics port. If the script system specified by the current graphics porttxFont
field has an associated font, as do Hebrew and Arabic,GetFontInfo
returns combined information based on both fonts. This is to accommodate text written in the Roman script when the primary script system is non-Roman. However, even if all of the text is written in a non-Roman script, if there is an associated font,GetFontInfo
always bases its information on the combined fonts. You can determine the line height, in pixels, by adding the values of the ascent, descent, and leading fields.The
GetFontInfo
procedure is similar to the Font Manager'sFontMetrics
procedure, except that theGetFontInfo
procedure returns integer values. See "The Font Information Record" on page 3-62 for a description of the record and its fields.