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 / Using the Font Manager


Using Fractional Glyph Widths and Font Scaling

Using fractional glyph widths allows the Font Manager to place glyphs on the screen
in a manner that closely matches the eventual placement of glyphs on a page printer
by high-resolution printers. (See "How the Font Manager Calculates Glyph Widths" on page 4-22.)

You can enable the use of fractional glyph widths with the SetFractEnable procedure. If you set the parameter fractEnable to TRUE, the Font Manager uses fractional glyph widths. If you set it to FALSE, the Font Manager uses integer glyph widths. The Font Manager sets the global variable FractEnable to FALSE by default. You can find out whether the Font Manager has used fractional widths in the calculations for the global width table or other tables by checking the value of the UsedFWidths global variable; if the value is nonzero, the Font Manager used fractional widths.

When a bitmapped font is not available in a specific size, the Font Manager can compute scaling factors for QuickDraw to use to create a bitmap of the requested size. You can set the Font Manager to compute scaling factors for bitmapped fonts by using the SetFScaleDisable procedure, which sets the value of the FScaleDisable global variable. If you set the fontScaleDisable parameter of this procedure to TRUE, the Font Manager disables font scaling.

When font scaling is disabled, the Font Manager responds to a request for a font size that is not available by returning a bitmapped font with the requested widths, which may mean that their height is smaller than the requested size. If you set it to FALSE, the Font Manager computes scaling factors for bitmapped fonts and QuickDraw scales the glyph bitmaps. The Font Manager sets the global variable FScaleDisable to FALSE by default. If the value of this global variable is FALSE, scaling is enabled. (See "The Scaling Process for a Bitmapped Font" on page 4-21.) If scaling is enabled, you can get the current horizontal and vertical scaling factors from the global variable FScaleHFact and FScaleVFact, respectively.

The Font Manager always scales an outline font, regardless of the value of the FScaleDisable global variable.

Fractional glyph widths and font scaling are also described in the chapter "QuickDraw Text" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996