Framework | ApplicationServices/ApplicationServices.h |
Declared in | Fonts.h |
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:
For drawing and measuring text, use Core Text on Mac OS X v10.5 and later to render text directly through a Quartz (Core Image) graphics context. See Core Text Programming Guide and Core Text Reference Collection. On Mac OS X v10.4 and earlier, you can use the Appearance Manager API or the ATSUI API. See Appearance Manager Reference, ATSUI Programming Guide, and ATSUI Reference.
For accessing information on fonts tracked by the operating system, use Core Text on Mac OS X v10.5 and later. See Core Text Programming Guide and Core Text Reference Collection. On Mac OS X v10.4 and earlier, use the ATS for Fonts API. See Apple Type Services for Fonts Programming Guide and Apple Type Services for Fonts Reference.
For accessing and modifying information on fonts in a Quartz graphics context, use the Quartz API. See Quartz 2D Programming Guide and Quartz 2D Reference Collection.
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.
FMGetGeneration
Deprecated in Mac OS X v10.5
FMActivateFonts
Deprecated in Mac OS X v10.4
FMDeactivateFonts
Deprecated in Mac OS X v10.4
FMGetFontContainer
Deprecated in Mac OS X v10.4
FMGetFontFormat
Deprecated in Mac OS X v10.4
FMGetFontGeneration
Deprecated in Mac OS X v10.4
FMGetFontTable
Deprecated in Mac OS X v10.4
FMGetFontTableDirectory
Deprecated in Mac OS X v10.4
FMGetFontContainerFromFontFamilyInstance
Deprecated in Mac OS X v10.4
FMGetFontFamilyResource
Deprecated in Mac OS X v10.4
FMGetFontFamilyFromName
Deprecated in Mac OS X v10.4
FMGetFontFamilyGeneration
Deprecated in Mac OS X v10.4
FMGetFontFamilyName
Deprecated in Mac OS X v10.4
FMGetFontFamilyTextEncoding
Deprecated in Mac OS X v10.4
FMCreateFontFamilyInstanceIterator
Deprecated in Mac OS X v10.4
FMCreateFontFamilyIterator
Deprecated in Mac OS X v10.4
FMCreateFontIterator
Deprecated in Mac OS X v10.4
FMDisposeFontFamilyInstanceIterator
Deprecated in Mac OS X v10.4
FMDisposeFontFamilyIterator
Deprecated in Mac OS X v10.4
FMDisposeFontIterator
Deprecated in Mac OS X v10.4
FMGetNextFont
Deprecated in Mac OS X v10.4
FMGetNextFontFamily
Deprecated in Mac OS X v10.4
FMGetNextFontFamilyInstance
Deprecated in Mac OS X v10.4
FMResetFontFamilyInstanceIterator
Deprecated in Mac OS X v10.4
FMResetFontFamilyIterator
Deprecated in Mac OS X v10.4
FMResetFontIterator
Deprecated in Mac OS X v10.4
FMFontGetCGFontRefFromFontFamilyInstance
FMGetATSFontRefFromFont
FMGetFontFromATSFontRef
FMGetATSFontFamilyRefFromFontFamily
Deprecated in Mac OS X v10.4
FMGetFontFamilyFromATSFontFamilyRef
Deprecated in Mac OS X v10.4
FMGetFontFamilyInstanceFromFont
Deprecated in Mac OS X v10.4
FMGetFontFromFontFamilyInstance
Deprecated in Mac OS X v10.4
FetchFontInfo
Deprecated in Mac OS X v10.4
FMSwapFont
Deprecated in Mac OS X v10.4
FontMetrics
Deprecated in Mac OS X v10.4
GetFNum
Deprecated in Mac OS X v10.4
GetFontName
Deprecated in Mac OS X v10.4
OutlineMetrics
Deprecated in Mac OS X v10.4
RealFont
Deprecated in Mac OS X v10.4
GetOutlinePreferred
Deprecated in Mac OS X v10.4
GetPreserveGlyph
Deprecated in Mac OS X v10.4
IsOutline
Deprecated in Mac OS X v10.4
SetOutlinePreferred
Deprecated in Mac OS X v10.4
SetPreserveGlyph
Deprecated in Mac OS X v10.4
IsAntiAliasedTextEnabled
Deprecated in Mac OS X v10.4
SetAntiAliasedTextEnabled
Deprecated in Mac OS X v10.4
QDTextBounds
Deprecated in Mac OS X v10.4
SetFractEnable
Deprecated in Mac OS X v10.4
SetFScaleDisable
Deprecated in Mac OS X v10.4
GetAppFont
Deprecated in Mac OS X v10.4
GetDefFontSize
Deprecated in Mac OS X v10.4
GetSysFont
Deprecated in Mac OS X v10.4
Obtains the Quartz font associated with a typeface from a QuickDraw font family.
OSStatus FMFontGetCGFontRefFromFontFamilyInstance ( FMFontFamily iFontFamily, FMFontStyle iStyle, CGFontRef *oFont, FMFontStyle *oStyle );
A QuickDraw font family.
A QuickDraw font style.
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.
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.
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
.
Fonts.h
Obtains the ATS font reference associated with a font object.
ATSFontRef FMGetATSFontRefFromFont ( FMFont iFont );
A font reference.
The ATSFontRef
associated with the font object.
Fonts.h
Obtains the font object associated with an ATS font reference.
FMFont FMGetFontFromATSFontRef ( ATSFontRef iFont );
An ATS font reference.
The font reference associated with the specified ATS font reference.
Fonts.h
Represents a font container.
typedef UInt32 FMFontContainer;
Contains information for a font instance.
struct FMFontInstance { FMFont font; UInt32 fontInstanceIndex; };
font
A font reference.
fontInstanceIndex
The index associated with the font.
Contains a font family and style.
struct FMFontSpecification { FMFontFamily fontFamily; SInt16 style; };
fontFamily
A font family reference.
style
A font style.
Represents the ID of a font family.
typedef FMFontFamily FontFamilyID;
Fonts.h
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; };
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).
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.
Defines a reference to a font output structure.
typedef FMOutputPtr FMOutPtr;
See FMOutput.
Fonts.h
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;
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).
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.
Fonts.h
Defines a pointer to a font output structure.
typedef FMOutput* FMOutputPtr;
Fonts.h
Contains font measurements.
struct FMetricRec { Fixed ascent; Fixed descent; Fixed leading; Fixed widMax; Handle wTabHandle; }; typedef struct FMetricRec FMetricRec;
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.
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.
Fonts.h
Defines a handle to a font metrics structure.
typedef FMetricRecPtr* FMetricRecHandle;
See FMetricRec.
Fonts.h
Defines a pointer to a font metrics structure.
typedef FMetricRec* FMetricRecPtr;
See FMetricRec.
Fonts.h
Represents the point size of a font.
typedef FMFontSize FontPointSize;
Fonts.h
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.
Contains the size and style for a specific font.
struct AsscEntry { SInt16 fontSize; SInt16 fontStyle; SInt16 fontID; };
fontSize
A font point size.
fontStyle
A font style.
fontID
A font Resource ID.
The font association entry structure is used in FontAssoc
.
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; };
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.
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.
Contains the number of entries in a font association table.
struct FontAssoc { SInt16 numAssoc; };
numAssoc
Number of entries - 1.
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.
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;
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.
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.
Fonts.h
Defines a handle to a font record.
typedef FontRecPtr* FontRecHdl;
Fonts.h
Defines a pointer to a font record.
typedef FontRec* FontRecPtr;
Fonts.h
Contains kerning information for a specific stylistic variation of the font family.
struct KernEntry { SInt16 kernStyle; SInt16 kernLength; };
kernStyle
Length of this entry.
kernLength
Style to which this entry applies.
Specifies a kerning value for a pair of glyphs.
struct KernPair { char kernFirst; char kernSecond; SInt16 kernWidth; };
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.
Contains the number of entries in a kerning table.
struct KernTable { SInt16 numKerns; };
numKerns
Number of subtable entries.
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.
Contains the base name and suffixes for a font family.
struct NameTable { SInt16 stringCount; Str255 baseFontName; };
stringCount
The number of entries in the name table.
baseFontName
A string that specifies the base name and suffixes for a font family name.
Contains font style information
struct StyleTable { SInt16 fontClass; SInt32 offset; SInt32 reserved; char indexes[48]; };
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.
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.
Specifies a style for a glyph width.
struct WidEntry { SInt16 widStyle; };
widStyle
The style to which the entry applies.
Specifies the number of entries in a font family glyph-width table.
struct WidTable { SInt16 numWidths; };
numWidths
The number of entries minus one.
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.
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;
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.
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:
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.
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.
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.
Fonts.h
Defines a handle to a glyph width table.
typedef WidthTablePtr* WidthTableHdl;
Fonts.h
Defines a pointer to a glyph width table.
typedef WidthTable* WidthTablePtr;
Fonts.h
Specify the scope of available fonts.
enum{ kFMDefaultActivationContext = kFMDefaultOptions, kFMGlobalActivationContext = 0x00000001, kFMLocalActivationContext = kFMDefaultActivationContext }
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
.
Specify the scope of fonts for an application.
enum { kFMDefaultOptions = kNilOptions };
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
.
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 };
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 };
You should use the functions GetFNum
or FMGetFontFamilyFromName
to find a font family from a standard QuickDraw name.
enum { kFMUseGlobalScopeOption };
Use the constant kFMGlobalIterationScope
instead; kFMUseGlobalScopeOption
is deprecated.
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 };
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
.
Specify a scope over which to iterate.
enum{ kFMDefaultIterationScope = kFMDefaultOptions, kFMGlobalIterationScope = 0x00000001, kFMLocalIterationScope = kFMDefaultIterationScope }
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
.
Specify a character to use for an active menu or submenu item.
enum { commandMark = 17, checkMark = 18, diamondMark = 19, appleMark = 20 };
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
.
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.
Defines the default font for the QuickTime user interface.
enum { kPlatformDefaultGuiFontID = applFont; };
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
.
This constant is used in QuickTime 3.0.
Specify the current system and application fonts.
enum { systemFont = 0, applFont = 1 };
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
.
The most common result codes returned by Font Manager are listed below.
© 2002, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-12-11)