Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 3 - QuickDraw Text / QuickDraw Text Reference
Routines / Setting Text Characteristics


GetFontInfo

The GetFontInfo 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
The GetFontInfo 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 port txFont 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's FontMetrics procedure, except that the GetFontInfo procedure returns integer values. See "The Font Information Record" on page 3-62 for a description of the record and its fields.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996