Important: The information in this document is obsolete and should not be used for new development.
GetFontInfo
TheGetFontInfoprocedure 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
TheGetFontInfoprocedure 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 porttxFontfield has an associated font, as do Hebrew and Arabic,GetFontInforeturns 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,GetFontInfoalways 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
GetFontInfoprocedure is similar to the Font Manager'sFontMetricsprocedure, except that theGetFontInfoprocedure returns integer values. See "The Font Information Record" on page 3-62 for a description of the record and its fields.