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
Routines / Scaling Outline Fonts


SetPreserveGlyph

The default behavior for the Font Manager is to scale a glyph from an outline font so that it fits between the ascent and descent lines; however, this alters the appearance of the glyph. The SetPreserveGlyph procedure changes this behavior temporarily so that the Font Manager does not scale oversized glyphs.

PROCEDURE SetPreserveGlyph (preserveGlyph: Boolean);
preserveGlyph
Specifies whether or not glyphs from an outline font are scaled to fit between the ascent and descent lines.
DESCRIPTION
The SetPreserveGlyph procedure establishes how the Font Manager treats glyphs that do not fit between the ascent and descent lines for the current font. If you set the value of the preserveGlyph parameter to TRUE, the measurements of all glyphs are preserved, which means that your application may have to alter the leading between lines in a document if some of the glyphs extend beyond the ascent or descent lines. If you set the value of the preserveGlyph parameter to FALSE, all glyphs are scaled to fit between the ascent and descent lines.

You can determine the current behavior of the Font Manager in this regard by calling the GetPreserveGlyph function. To ensure that documents have the same appearance whenever they are opened, you need to call GetPreserveGlyph and save the value that it returns with your documents and restore it each time a document is displayed by your application.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the SetPreserveGlyph procedure are
Trap macroRoutine selector
_FontDispatch$700A


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996