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 4 - Font Manager / Font Manager Reference
Data Structures


The Font Output Record

The font output record, of data type FMOutput, contains a handle to a font and information about font measurements. It is filled in by the Font Manager upon responding to a font request. You can request a font using the FMSwapFont function, which is described on page 4-60.

TYPE FMOutput =
PACKED RECORD
   errNum:     Integer;    {reserved for internal use}
   fontHandle: Handle;     {handle to font}
   bold:       Byte;       {for drawing of bold style}
   italic:     Byte;       {for drawing of italic style}
   ulOffset:   Byte;       {for drawing of underline style}
   ulShadow:   Byte;       {for drawing of underline shadow style}
   ulThick:    Byte;       {for drawing of underline thickness}
   shadow:     Byte;       {for drawing of shadow style}
   extra:      SignedByte; {# of pixels added for styles}
   ascent:     Byte;       {ascent measurement of font}
   descent:    Byte;       {descent measurement of font}
   widMax:     Byte;       {maximum width of glyphs in font}
   leading:    SignedByte; {leading value for font}
   fOutCurStyle:
               Byte;       {actual output font style}
   numer:      Point;      {scaling factor numerators}
   denom:      Point;      {scaling factor denominators}
END;
Field Description
errNum
Reserved for use by Apple Computer, Inc.
fontHandle
A handle to the font resource requested by the font input record, which may either be a bitmapped font or outline font resource.
The bitmapped font is described in the section "The Bitmapped Font ('NFNT') Resource," which begins on page 4-62. The outline font is described in the section "The Outline Font ('sfnt') Resource," which begins on page 4-68.
bold
Modifies how QuickDraw applies the bold style on the screen
and on raster printers. Other display devices may handle
styles differently.
italic
Modifies how QuickDraw applies the italic style on the screen
and on raster printers. Other display devices may handle
styles differently.
ulOffset
Modifies how QuickDraw applies the underline style on the
screen and on raster printers. Other display devices may handle
styles differently.
ulShadow
Modifies how QuickDraw applies the underline shadow style on the screen and on raster printers. Other display devices may handle styles differently.
ulThick
Modifies how QuickDraw applies the thickness of the underline style on the screen and on raster printers. Other display devices may handle styles differently.
shadow
Modifies how QuickDraw applies the shadow style on the screen and on raster printers. Other display devices may handle styles differently.
extra
The number of pixels by which the styles have widened each glyph.
ascent
The ascent measurement of the font. Any algorithmic styles or stretching that may be applied to the font are not taken into account for this value.
descent
The descent measurement of the font. Any algorithmic styles or stretching that may be applied to the font are not taken into account for this value.
widMax
The maximum width of the font. Any algorithmic styles or stretching that may be applied to the font are not taken into account for this value.
leading
The leading assigned to the font. Any algorithmic styles or stretching that may be applied to the font are not taken into account for this value.
fOutCurStyle
The actual style being made available for QuickDraw's text drawing, as opposed to the requested style.
numer
The numerators of the vertical and horizontal scaling factors. (For more information about font scaling, see "How the Font Manager Scales Fonts" on page 4-19.) The numer field is of type Point and contains two integers: the first is the numerator of the ratio for vertical scaling and the second is the numerator of the ratio for horizontal scaling.
denom
The denominators of the vertical and horizontal scaling factors. (For more information about font scaling, see "How the Font Manager Scales Fonts" on page 4-19.) The denom field is of type Point and contains two integers: the first is the denominator of the ratio for vertical scaling and the second is the denominator of the ratio for horizontal scaling.
The bold, italic, ulOffset, ulShadow, ulThick, and shadow values are all used to communicate to QuickDraw how to modify the way it renders each stylistic variation. Each byte value is taken from the font characterization table of the printer driver and is used by QuickDraw when it draws to a screen or raster printer.

The ascent, descent, widMax, and leading values can all be different in this record than the corresponding values in the FontInfo record that is produced by the GetFontInfo function in QuickDraw. This is because GetFontInfo takes into account any algorithmic styles or stretching that QuickDraw performs, while the Font Manager routines do not.

The numer and denom values are used to designate how font scaling is to be done. The values for these fields in the font output record can be different than the values specified in the font input record. For more information about font scaling, see the section "How the Font Manager Scales Fonts," which begins on page 4-19.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996