Next Page > Hide TOC

Font Manager Reference

Framework
ApplicationServices/ApplicationServices.h
Declared in
Fonts.h

Overview

As of Mac OS X version 10.5, all Font Manager functions but three (FMFontGetCGFontRefFromFontFamilyInstance, FMGetATSFontRefFromFont, and FMGetFontFromATSFontRef) are deprecated. Most were deprecated in Mac OS X v10.4. The Font Manager was the font management API for the QuickDraw framework, which is now deprecated.

There are several alternatives that provide better compatibility with the rest of Mac OS X than using QuickDraw font functions. You should consider the following:

The Font Manager API was used to manage the fonts your application uses to display and print text. The Font Manager was used to determine the characteristics of a font, change certain font settings, favor outline fonts over bitmapped fonts, and manipulate fonts in memory.

Functions by Task

Activating and Deactivating Fonts

Accessing Font Objects

Accessing Font Containers

Accessing Font Family Objects

Enumerating Font Data

Converting Font Data

Getting Font Information

Working With Outline Fonts

Working with Antialiased Text

Working With Font Measurements and Scaling

Using the Current, System, and Application Fonts

Functions

FMFontGetCGFontRefFromFontFamilyInstance

Obtains the Quartz font associated with a typeface from a QuickDraw font family.

OSStatus FMFontGetCGFontRefFromFontFamilyInstance (
   FMFontFamily iFontFamily,
   FMFontStyle iStyle,
   CGFontRef *oFont,
   FMFontStyle *oStyle
);

Parameters
iFontFamily

A QuickDraw font family.

iStyle

A QuickDraw font style.

oFont

A pointer to a Quartz font reference. On output, points to the Quartz font reference for the specified font family and style. You are responsible for allocating the memory for the Quartz font reference.

oStyle

On output, a pointer to an intrinsic font style. If a font object isn’t found that matches the font family reference and font style you specify, the function returns the QuickDraw style that matches most closely.

Return Value

A result code. See “Font Manager Result Codes.” If a font reference and intrinsic style are not found, the function returns a value of kFMInvalidFontErr.

Availability
Declared In
Fonts.h

FMGetATSFontRefFromFont

Obtains the ATS font reference associated with a font object.

ATSFontRef FMGetATSFontRefFromFont (
   FMFont iFont
);

Parameters
iFont

A font reference.

Return Value

The ATSFontRef associated with the font object.

Availability
Declared In
Fonts.h

FMGetFontFromATSFontRef

Obtains the font object associated with an ATS font reference.

FMFont FMGetFontFromATSFontRef (
   ATSFontRef iFont
);

Parameters
iFont

An ATS font reference.

Return Value

The font reference associated with the specified ATS font reference.

Availability
Declared In
Fonts.h

Data Types

Font and Font Family Data Structures

FMFontContainer

Represents a font container.

typedef UInt32 FMFontContainer;

FMFontInstance

Contains information for a font instance.

struct FMFontInstance {
   FMFont font;
   UInt32 fontInstanceIndex;
};

Fields
font

A font reference.

fontInstanceIndex

The index associated with the font.

FMFontSpecification

Contains a font family and style.

struct FMFontSpecification {
   FMFontFamily fontFamily;
   SInt16 style;
};

Fields
fontFamily

A font family reference.

style

A font style.

FontFamilyID

Represents the ID of a font family.

typedef FMFontFamily FontFamilyID;

Availability
Declared In
Fonts.h

Font Input and Output Structures

FMInput

Contains information about a specific font.

struct FMInput {
   SInt16 family;
   SInt16 size;
   Style face;
   Boolean needBits;
   SInt16 device;
   Point numer;
   Point denom;
   float x;
   float y;
   float width;
   float height;
   CGPoint origin;
   CGSize size;
};

Fields
family

The font family ID.

size

The point size of the font.

face

The font style. The defined QuickDraw styles are bold, italic, underline, outline, shadow, condense, and extend.

needBits

Indicates whether QuickDraw draws the glyphs. If QuickDraw does not draw the glyphs, as is the case for measurement functions such as MeasureText, then the glyph bitmaps do not have to be read or constructed. If QuickDraw draws the glyphs and the font is contained in a bitmapped font resource, all of the information describing the font, including the bit image, is read into memory.

device

This is no longer used. The high-order byte contains the printer driver reference number as defined in the old Printing Manager. The low-order byte is reserved.

numer

The numerators of the vertical and horizontal scaling factors. The numer field is of type Point and contains two fields: h (the numerator of the ratio for horizontal scaling) and v (the numerator of the ratio for vertical scaling).

denom

The denominators of the vertical and horizontal scaling factors. The denom field is of type Point and contains two fields: h (the denominator of the ratio for horizontal scaling) and v (the denominator of the ratio for vertical scaling).

Discussion

The font input structure, of data type FMInput, is used by QuickDraw when it requests a font from the Font Manager. You can also use this data type when you request a font with the FMSwapFont function.

FMOutPtr

Defines a reference to a font output structure.

typedef FMOutputPtr FMOutPtr;

Discussion

See FMOutput.

Availability
Declared In
Fonts.h

FMOutput

Contains a handle to a font resource and measurement and display information about a specific font.

struct FMOutput {
   SInt16 errNum;
   Handle fontHandle;
   UInt8 boldPixels;
   UInt8 italicPixels;
   UInt8 ulOffset;
   UInt8 ulShadow;
   UInt8 ulThick;
   UInt8 shadowPixels;
   SInt8 extra;
   UInt8 ascent;
   UInt8 descent;
   UInt8 widMax;
   SInt8 leading;
   SInt8 curStyle;
   Point numer;
   Point denom;
};
typedef struct FMOutput FMOutput;

Fields
errNum

Reserved for use by Apple Computer, Inc.

fontHandle

A handle to the font resource. The font resource can be for either a bitmapped font or outline font resource.

boldPixels

A value used by QuickDraw to modify how it applies the bold style on the screen and on raster printers. Other display devices may handle styles differently.

italicPixels

A value used by QuickDraw to modify how it applies the italic style on the screen and on raster printers. Other display devices may handle styles differently.

ulOffset

A value used by QuickDraw to modify how it applies the underline style on the screen and on raster printers. Other display devices may handle styles differently.

ulShadow

A value used by QuickDraw to modify how it applies the underline shadow style on the screen and on raster printers. Other display devices may handle styles differently.

ulThick

A value used by QuickDraw to modify how it applies the thickness of the underline style on the screen and on raster printers. Other display devices may handle styles differently.

shadowPixels

A value used by QuickDraw to modify how it 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.

curStyle

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. The numer parameter is of type Point, and contains two fields: h (the numerator of the ratio for horizontal scaling) and v (the numerator of the ratio for vertical scaling).

denom

The denominators of the vertical and horizontal scaling factors. The demon parameter is of type Point, and contains two fields: h (the denominator of the ratio for horizontal scaling) and v (the denominator of the ratio for vertical scaling).

Discussion

The font output structure, 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.

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 structure than the corresponding values in the FontInfo structure 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 functions 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 structure can be different than the values specified in the font input structure.

Availability
Declared In
Fonts.h

FMOutputPtr

Defines a pointer to a font output structure.

typedef FMOutput* FMOutputPtr;

Availability
Declared In
Fonts.h

Font Measurements

FMetricRec

Contains font measurements.

struct FMetricRec {
   Fixed ascent;
   Fixed descent;
   Fixed leading;
   Fixed widMax;
   Handle wTabHandle;
};
typedef struct FMetricRec FMetricRec;

Fields
ascent

The measurement, in pixels, from the baseline to the ascent line of the font. You can determine the line height, in pixels, by adding the values of the ascent, descent, and leading fields of the font metrics structure.

descent

The measurement, in pixels, from the baseline to the descent line of the font.

leading

The measurement, in pixels, from the descent line to the ascent line below it.

widMax

The width, in pixels, of the largest glyph in the font.

wTabHandle

A handle to the global font width table.

Discussion

The font metrics structure (of data type FMetricRec) contains a handle to the global width table, which in turn contains a handle to the associated font family resource for the current font (the font in the current graphics port). It also contains the values of four measurements for the current font.

Availability
Declared In
Fonts.h

FMetricRecHandle

Defines a handle to a font metrics structure.

typedef FMetricRecPtr* FMetricRecHandle;

Discussion

See FMetricRec.

Availability
Declared In
Fonts.h

FMetricRecPtr

Defines a pointer to a font metrics structure.

typedef FMetricRec* FMetricRecPtr;

Discussion

See FMetricRec.

Availability
Declared In
Fonts.h

FontPointSize

Represents the point size of a font.

typedef FMFontSize FontPointSize;

Availability
Declared In
Fonts.h

Deprecated Data Types

The following data structures referenced by the low memory global variables of the Font Manager are deprecated in Mac OS X and CarbonLib 1.1. The low memory global variables are not shared between processes and may result in inconsistencies compared to previous releases of the system software. Changes made to the information contained in the low memory global variables, including any indirectly reference width tables, font family records, and font records, are not reflected in the global state of the Font Manager and may only be accessed through the font access and data management function of the Font Manager or ATS.

AsscEntry

Contains the size and style for a specific font.

struct AsscEntry {
   SInt16 fontSize;
   SInt16 fontStyle;
   SInt16 fontID;
};

Fields
fontSize

A font point size.

fontStyle

A font style.

fontID

A font Resource ID.

Discussion

The font association entry structure is used in FontAssoc.

FamRec

Contains format information for a font family resource.

struct FamRec {
   SInt16 ffFlags;
   SInt16 ffFamID;
   SInt16 ffFirstChar;
   SInt16 ffLastChar;
   SInt16 ffAscent;
   SInt16 ffDescent;
   SInt16 ffLeading;
   SInt16 ffWidMax;
   SInt32 ffWTabOff;
   SInt32 ffKernOff;
   SInt32 ffStylOff;
   SInt16 ffProperty[9];
   SInt16 ffIntl[2];
   SInt16 ffVersion;
};

Fields
ffFlags

Flags for family.

ffFamID

Family ID number.

ffFirstChar

ASCII code of first character.

ffLastChar

ASCII code of last character.

ffAscent

Maximum ascent for 1-point font.

ffDescent

Maximum descent for 1-point font.

ffLeading

Maximum leading for 1-point font.

ffWidMax

Maximum glyph width for 1-point font.

ffWTabOff

Offset to family glyph-width table.

ffKernOff

Offset to kerning table.

ffStylOff

Offset to style-mapping table.

ffProperty

Style properties info.

ffIntl

For international use.

ffVersion

Version number.

Discussion

The font family structure, of data type FamRec, describes the format of the font family ('FOND') resource. It is shown here as a guide to the format of the resource. The font family structure is not used directly by any Font Manager functions.

FontAssoc

Contains the number of entries in a font association table.

struct FontAssoc {
   SInt16 numAssoc;
};

Fields
numAssoc

Number of entries - 1.

Discussion

Each entry in the font association table is a font association entry structure, of data type AsscEntry.

The font association table structure, which is part of the font family resource, maps a point size and style to a specific font that is part of the family. The table structure, of data type FontAssoc, consists of a count of the entries in the table and is followed by the entry structures.

FontRec

Contains information for a format of ‘NFNT' and, likewise, the 'FONT' resource

struct FontRec {
   SInt16 fontType;
   SInt16 firstChar;
   SInt16 lastChar;
   SInt16 widMax;
   SInt16 kernMax;
   SInt16 nDescent;
   SInt16 fRectWidth;
   SInt16 fRectHeight;
   UInt16 owTLoc;
   SInt16 ascent;
   SInt16 descent;
   SInt16 leading;
   SInt16 rowWords;
};
typedef struct FontRec FontRec;

Fields
fontType

Font type.

firstChar

Character code of first glyph.

lastChar

Character code of last glyph.

widMax

Maximum glyph width.

kernMax

Negative of maximum glyph kern.

nDescent

Negative of descent.

fRectWidth

Width of font rectangle.

fRectHeight

Height of font rectangle.

owTLoc

Location of width/offset table.

ascent

Ascent.

descent

Descent.

leading

Leading.

rowWords

Row width of bit image / 2.

Discussion

The font structure, of data type FontRec, describes the format of ‘NFNT' and, likewise, the 'FONT' resource. It is shown here as a guide to the format of the resource. The font structure is not used directly by any Font Manager functions.

Availability
Declared In
Fonts.h

FontRecHdl

Defines a handle to a font record.

typedef FontRecPtr* FontRecHdl;

Availability
Declared In
Fonts.h

FontRecPtr

Defines a pointer to a font record.

typedef FontRec* FontRecPtr;

Availability
Declared In
Fonts.h

KernEntry

Contains kerning information for a specific stylistic variation of the font family.

struct KernEntry {
   SInt16 kernStyle;
   SInt16 kernLength;
};

Fields
kernStyle

Length of this entry.

kernLength

Style to which this entry applies.

KernPair

Specifies a kerning value for a pair of glyphs.

struct KernPair {
   char kernFirst;
   char kernSecond;
   SInt16 kernWidth;
};

Fields
kernFirst

ASCII character code of the first character of a kerned pair.

kernSecond

ASCII character code of the second character of a kerned pair.

kernWidth

Kerning value in 1pt fixed format.

KernTable

Contains the number of entries in a kerning table.

struct KernTable {
   SInt16 numKerns;
};

Fields
numKerns

Number of subtable entries.

Discussion

The font family kerning table structure, which is part of the font family resource, contains a number of kerning subtable entries, with different subtables for different stylistic variations. The table structure, of data type KernTable, consists of a count of the entries in the table and is followed by the entry structures.

NameTable

Contains the base name and suffixes for a font family.

struct NameTable {
   SInt16 stringCount;
   Str255 baseFontName;
};

Fields
stringCount

The number of entries in the name table.

baseFontName

A string that specifies the base name and suffixes for a font family name.

StyleTable

Contains font style information

struct StyleTable {
   SInt16 fontClass;
   SInt32 offset;
   SInt32 reserved;
   char indexes[48];
};

Fields
fontClass

The font class of this table.

offset

Offset to glyph-encoding subtable.

reserved

Reserved.

indexes

Indexes into the font suffix name table. The font suffix name subtable structure, of data type NameTable, contains the base name and suffixes for a font family.

Discussion

The style-mapping table structure, which is part of the font family resource, provides information that is used by printer drivers to implement font styles. Each font family can have its own character encoding and its own set of font suffix names for style designations. Each style of a font has its own name, typically created by adding a style suffix to the base name of the font.

WidEntry

Specifies a style for a glyph width.

struct WidEntry {
   SInt16 widStyle;
};

Fields
widStyle

The style to which the entry applies.

WidTable

Specifies the number of entries in a font family glyph-width table.

struct WidTable {
   SInt16 numWidths;
};

Fields
numWidths

The number of entries minus one.

Discussion

The font family glyph-width table structure, which is part of the font family resource, is used to specify glyph widths for the font family on a per-style basis.

WidthTable

Contains the widths of all the glyphs of a specific font.

struct WidthTable {
   Fixed tabData[256];
   Handle tabFont;
   SInt32 sExtra;
   SInt32 style;
   SInt16 fID;
   SInt16 fSize;
   SInt16 face;
   SInt16 device;
   Point inNumer;
   Point inDenom;
   SInt16 aFID;
   Handle fHand;
   Boolean usedFam;
   UInt8 aFace;
   SInt16 vOutput;
   SInt16 hOutput;
   SInt16 vFactor;
   SInt16 hFactor;
   SInt16 aSize;
   SInt16 tabSize;
};
typedef struct WidthTable WidthTable;

Fields
tabData

The widths for the glyphs in the font, in standard 32-bit fixed-point format. If a glyph is missing in the font, its entry contains the width of the missing-character glyph.

tabFont

A handle to the font resource used to build this table.

sExtra

The average number of pixels by which QuickDraw widens each space in a line of text.

style

The average number of pixels by which QuickDraw widens a line of text after applying a style.

fID

The font family ID of the font represented by this table. This is the ID that was used in the request to build the table. It may be different from the ID of the font family that was used, which is indicated by the aFID field.

fSize

The point size that was originally requested for the font represented by this table. The actual size used is specified in the aSize field.

face

The font style that was originally requested for the font represented by this table. The actual style used is specified in the aFace field.

device

The device ID of the device on which these widths may be used.

inNumer

The numerators of the vertical and horizontal scaling factors. The numer parameter is of type Point, and contains two fields: h (the numerator of the ratio for horizontal scaling) and v (the numerator of the ratio for vertical scaling).

inDenom

The denominators of the vertical and horizontal scaling factors. The denom parameter is of type Point, and contains two fields: h (the denominator of the ratio for horizontal scaling) and v (the denominator of the ratio for vertical scaling).

aFID

The font family ID of the font family actually used to build this table. If the Font Manager could not find the font requested, this value may be different from the value of the fID field.

fHand

The handle to the font family resource used to build this table.

usedFam

Set to TRUE if the fixed-point family glyph widths were used rather than integer glyph widths.

aFace

The font style of the font whose widths are contained in this table.

vOutput

The factor by which glyphs are to be expanded vertically in the current graphics port. This is a 16-bit fixed-point number, with the integer part in the high-order byte and a fractional part in the low-order byte.

hOutput

The factor by which glyphs are to be expanded horizontally in the current graphics port. This is a 16-bit fixed-point number, with the integer part in the high-order byte and a fractional part in the low-order byte.

vFactor

The factor by which widths of the chosen font, after a style has been applied, have been increased vertically in the current graphics port. This is a 16-bit fixed-point number, with the integer part in the high-order byte and a fractional part in the low-order byte. The value of the vFactor field is not used by the Font Manager.

hFactor

The factor by which widths of the chosen font, after a style has been applied, have been increased horizontally in the current graphics port. This is a 16-bit fixed-point number, with the integer part in the high-order byte and a fractional part in the low-order byte.

aSize

The size of the font actually used to build this table. Both the point size and the font used to build this table may be different from the requested point size and font. If font scaling is disabled, the Font Manager may use a size different from the size requested and add more or less space to approximate the appearance of the font requested.

tabSize

The total size of the global width table.

Discussion

The global width table structure, of data type WidthTable, contains the widths of all the glyphs of one font. The font family, point size, and style of this font are specified in this table. Your application should use the widths found in the global width table for placement of glyphs and words both on the screen and on the printed page. You can use the FontMetrics function to get a handle to the global width table. However, you should not assume that the table is the same size as shown in the structure declaration; it may be larger because of some private system-specific information that is attached to it.

Multiplying the values of the hOutput and vOutput fields by the values of the hFactor and vFactor fields, respectively, gives the font scaling. (Because the value of the vFactor field is ignored, the Font Manager multiplies the value of the vOutput field by 1.) The product of the value of the hOutput field and an entry in the global width table is the scaled width for that glyph.

The Font Manager gathers data for the global width table from one of three data structures:

  1. The Font Manager looks in the font resource for a table that stores fractional glyph widths. For bitmapped fonts, the Font Manager uses the glyph-width table of the bitmapped font resource. For outline fonts, the Font Manager uses the advance width and left-side bearing values in the horizontal metrics table of the outline font. In both cases, the values are stored in 16-bit fixed format, with the integer part in the high-order byte and the fractional part in the low-order byte.

  2. If there is no glyph-width table in the font resource, the Font Manager looks for the font family’s glyph-width table in the font family resource, which contains fractional widths for a hypothetical 1-point font. The Font Manager calculates the actual values by multiplying these widths by the requested font size.

  3. If there is no glyph-width table in the font family resource, and if the font is contained in a bitmapped font resource, the Font Manager derives the glyph widths from the integer widths contained in the glyph-width table of the bitmapped font resource. There is no corresponding table for the outline font resource.

Your application should obtain glyph widths either from the global width table or from the QuickDraw function MeasureText. The MeasureText function works only with text to be displayed on the screen, not with text to be printed. You can get the individual widths of glyphs of an outline font using the OutlineMetrics function. The FontMetrics function returns only the width of the largest glyph in a font contained in a bitmapped font resource.

Do not use the values from the global width table if your application is running on a computer on which non-Roman script systems are installed. You can check to see if a non-Roman script system is present by calling the GetScriptManagerVariable function with a selector of smEnabled; if the function returns a value greater than 0, at least one non-Roman script system is present and you need to call MeasureText to measure text that is displayed on the screen. Measuring text from a non-Roman script system for printing is handled by the printer driver.

For more information about the MeasureText function, see the documentation on “QuickDraw Text”. See also the FontMetrics and OutlineMetrics functions.

Availability
Declared In
Fonts.h

WidthTableHdl

Defines a handle to a glyph width table.

typedef WidthTablePtr* WidthTableHdl;

Availability
Declared In
Fonts.h

WidthTablePtr

Defines a pointer to a glyph width table.

typedef WidthTable* WidthTablePtr;

Availability
Declared In
Fonts.h

Constants

Activation Contexts

Specify the scope of available fonts.

enum{
kFMDefaultActivationContext = kFMDefaultOptions,
kFMGlobalActivationContext = 0x00000001,
kFMLocalActivationContext = kFMDefaultActivationContext
}

Constants
kFMDefaultActivationContext

Specifies to use the default scope, which is local.

Available in Mac OS X v10.1 and later.

Declared in Fonts.h.

kFMGlobalActivationContext

Specifies the scope is global; fonts are available to all applications.

Available in Mac OS X v10.1 and later.

Declared in Fonts.h.

kFMLocalActivationContext

Specifies the scope is local; fonts are available only to the application.

Available in Mac OS X v10.1 and later.

Declared in Fonts.h.

Default Options

Specify the scope of fonts for an application.

enum {
   kFMDefaultOptions = kNilOptions
};

Constants
kFMDefaultOptions

Restricts the scope only to the fonts accessible to your application. This flag is also used when Apple has not yet defined options for a function that has an options parameter. When no options are defined yet, you can use kFMDefaultOptions as a neutral value to assure future compatibility.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

Font ID Constants

Specify a font. These constants are deprecated.

enum {
   kFontIDNewYork = 2,
   kFontIDGeneva = 3,
   kFontIDMonaco = 4,
   kFontIDVenice = 5,
   kFontIDLondon = 6,
   kFontIDAthens = 7,
   kFontIDSanFrancisco = 8,
   kFontIDToronto = 9,
   kFontIDCairo = 11,
   kFontIDLosAngeles = 12,
   kFontIDTimes = 20,
   kFontIDHelvetica = 21,
   kFontIDCourier = 22,
   kFontIDSymbol = 23,
   kFontIDMobile = 24
};

Font Constants

Specify a font. These constants are deprecated.

enum {
   newYork = 2,
   geneva = 3,
   monaco = 4,
   venice = 5,
   london = 6,
   athens = 7,
   sanFran = 8,
   toronto = 9,
   cairo = 11,
   losAngeles = 12,
   times = 20,
   helvetica = 21,
   courier = 22,
   symbol = 23,
   mobile = 24
};

Discussion

You should use the functions GetFNum or FMGetFontFamilyFromName to find a font family from a standard QuickDraw name.

Global Scope Option

enum {
kFMUseGlobalScopeOption
};

Discussion

Use the constant kFMGlobalIterationScope instead; kFMUseGlobalScopeOption is deprecated.

Height and Width Constants

Specify proportional or fixed font heights and widths.

enum {
   propFont = 36864,
   prpFntH = 36865,
   prpFntW = 36866,
   prpFntHW = 36867,
   fixedFont = 45056,
   fxdFntH = 45057,
   fxdFntW = 45058,
   fxdFntHW = 45059,
   fontWid = 44208
};

Constants
propFont

Specifies a proportional font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

prpFntH

Specifies a proportional height font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

prpFntW

Specifies a proportional width font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

prpFntHW

Specifies a proportional width and height font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

fixedFont

Specifies a fixed font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

fxdFntH

Specifies a fixed height font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

fxdFntW

Specifies a fixed width font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

fxdFntHW

Specifies a fixed height and width font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

fontWid

Specifies a font width.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

Iteration Scopes

Specify a scope over which to iterate.

enum{
kFMDefaultIterationScope = kFMDefaultOptions,
kFMGlobalIterationScope = 0x00000001,
kFMLocalIterationScope = kFMDefaultIterationScope
}

Constants
kFMDefaultIterationScope

Specifies to use the default.

Available in Mac OS X v10.1 and later.

Declared in Fonts.h.

kFMGlobalIterationScope

Specifies the scope is global, iterate over all applications.

Available in Mac OS X v10.1 and later.

Declared in Fonts.h.

kFMLocalIterationScope

Specifies the scope is local, restrict the iteration to the application.

Available in Mac OS X v10.1 and later.

Declared in Fonts.h.

Marking Character Constants

Specify a character to use for an active menu or submenu item.

enum {
   commandMark = 17,
   checkMark = 18,
   diamondMark = 19,
   appleMark = 20
};

Constants
commandMark

Specifies to use a command mark next to an active menu or submenu item.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

checkMark

Specifies to use a check mark next to an active menu or submenu item.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

diamondMark

Specifies to use a diamond mark next to an active menu or submenu item.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

appleMark

Specifies to use an Apple character next to an active menu or submenu item.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

Discussion

You can pass these constants in the markChar parameter of the Menu Manager function GetItemMark and the marking character field of the menu resource (of type 'MENU') and return these constants in the markChar parameter of the Menu Manager function SetItemMark to specify the mark of a specific menu item or the menu ID of the submenu associated with the menu item.

QuickTime User Interface Default Font

Defines the default font for the QuickTime user interface.

enum {
   kPlatformDefaultGuiFontID = applFont;
};

Constants
kPlatformDefaultGuiFontID

Specifies that the default font ID for the graphical user interface in QuickTime 3.0 should be the application font ID.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

Discussion

This constant is used in QuickTime 3.0.

System and Application Fonts

Specify the current system and application fonts.

enum {
   systemFont = 0,
   applFont = 1
};

Constants
systemFont

Specifies the current System font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

applFont

Specifies the current application font.

Available in Mac OS X v10.0 and later.

Declared in Fonts.h.

Result Codes

The most common result codes returned by Font Manager are listed below.

Result CodeValueDescription
kFMIterationCompleted -980

Iteration successfully completed.

Available in Mac OS X v10.0 and later.

kFMInvalidFontFamilyErr -981

The specified font family is invalid.

Available in Mac OS X v10.0 and later.

kFMInvalidFontErr -982

The specified font is invalid.

Available in Mac OS X v10.0 and later.

kFMIterationScopeModifiedErr -983

Iteration scope modified.

Available in Mac OS X v10.0 and later.

kFMTableAccessErr -984

The table specified is invalid or doesn’t exist.

kFMFontContainerAccessErr -985

Not able to access font container.

Available in Mac OS X v10.0 and later.



Next Page > Hide TOC


© 2002, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-12-11)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.