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


Routines

Initializing the Font Manager

pascal void InitFonts           (void);

Getting Font Information

pascal void GetFontName         (short familyID, Str255 theName);
pascal void GetFNum             (ConstStr255Param name, short *familyID);
pascal Boolean RealFont         (short fontNum, short size);

Using the Current, System, and Application Fonts

pascal short GetDefFontSize     (void);
pascal short GetSysFont         (void);
pascal short GetAppFont         (void);

Getting the Characteristics of a Font

pascal void FontMetrics         (const FMetricRec *theMetrics);
pascal OSErr OutlineMetrics     (short byteCount, const void *textPtr,
                                 Point numer, Point denom, short *yMax,
                                 short *yMin, FixedPtr awArray,
                                 FixedPtr lsbArray, RectPtr boundsArray);

Enabling Fractional Glyph Widths

pascal void SetFractEnable      (Boolean fractEnable);

Disabling Font Scaling

pascal void SetFScaleDisable    (Boolean fscaleDisable);

Favoring Outline Fonts Over Bitmapped Fonts

pascal void SetOutlinePreferred
                                (Boolean outlinePreferred);
pascal Boolean GetOutlinePreferred
                                (void);
pascal Boolean IsOutline        (Point numer, Point denom);

Scaling Outline Fonts

pascal void SetPreserveGlyph
                                (Boolean preserveGlyph);
pascal Boolean GetPreserveGlyph
                                (void);

Accessing Information About a Font

pascal FMOutPtr FMSwapFont      (const FMInput *inRec);

Handling Fonts in Memory

pascal void SetFontLock         (Boolean lockFlag);
pascal OSErr FlushFonts         (void);

Assembly-Language Summary

Trap Macros

Trap Macros
Trap macro nameTrap word
_FMSwapFont$A901
_FontMetrics$A835
_GetFNum$A900
_GetFontName$A8FF
_InitFonts$A8FE
_RealFont$A902
_SetFontLock$A903
_SetFScaleDisable$A834
with Trap Words

Trap Macros Requiring Routine Selectors

_FontDispatch
SelectorRoutine
$7000IsOutline
$7001SetOutlinePreferred
$7008OutlineMetrics
$7009GetOutlinePreferred
$700ASetPreserveGlyph
$700BGetPreserveGlyph
$700CFlushFonts

Global Variables
ApFontIDFont ID of application font.
CurFMInputThe current QuickDraw FMInput record for FMSwapFont.
FDevDisableDisables device-defined extra spacing for styles.
FMDefaultSizeThe default point size.
FMgrOutReccThe current FMOutput record from FMSwapFont.
FONDIDThe resource ID of the last font family resource used.
FractEnableIf nonzero, fractional widths are enabled.
FScaleDisableIf nonzero, scaling is disabled.
FScaleHFactThe current horizontal scale factor.
FScaleVFactThe current vertical scale factor.
IntlSpecInternational software installed if the value of this is greater than zero.
LastFONDHandle to last family record used.
LastSPExtraThe most recent value of extra spacing for styles.
ROMFont0Handle to font record for system font.
SynListHandleHandle to synthetic font list.
SysFontFamIf nonzero, the font ID to use for the system font.
SysFontSizIf nonzero, the size of the system font.
UsedFWidthsA flag determining whether fractional widths were used for the most recent font request.
WidthListHandHandle to a list of handles to recently used width tables (referred to in some places as jFontInfo).
WidthPtrPointer to global width table.
WidthTabHandleHandle to global width table.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996