A function identified as deprecated has been superseded and may become unsupported in the future.
Activates one or more fonts from a file specification. (Deprecated in Mac OS X v10.5. Instead use ATSFontActivateFromFileReference
.)
OSStatus ATSFontActivateFromFileSpecification ( const FSSpec *iFile, ATSFontContext iContext, ATSFontFormat iFormat, void *iReserved, ATSOptionFlags iOptions, ATSFontContainerRef *oContainer );
A pointer to the file specification that specifies the name and location of a file or directory that contains the font data you want to activate.
A value that specifies the context of the activated font. If you want the activated font to be accessible only from your application use the kATSFontContextLocal
constant. If you want the activated font to be accessible to all applications use the constant kATSFontContextGlobal
. See “Context Options” for more information.
A value that represents the format identifier of the font. Pass kATSFontFormatUnspecified
as the system automatically determines the format of the font. For more information on this constant, see “Font Formats.”
An arbitrary 32-bit value. This parameter is currently reserved for future use, so you should pass NULL
.
An options flag. Pass kATSOptionFlagsDefault
unless the font’s data fork contains resource-fork information, you need to activate a directory of font directories, or you plan to call this function a number of time. If the font’s data fork contains resource-fork information, pass the option kATSOptionFlagsUseDataForkAsResourceFork
. If the you want to activate a font directory that contains font directories, you must pass the option kATSOptionFlagsProcessSubdirectories
. If you plan to call this function a number of times, you can set the iOptions
parameter to kATSOptionFlagsDoNotNotify
set. When you are done activating fonts you can call the function ATSFontNotify
with the action
parameter set to kATSFontNotifyActionFontsChanged
. Then ATS notifies all applications who subscribe to notifications of the changes you made.
On output, a reference to the font container that is activated from the file specification. You need this reference when you deactivate the font by calling the function ATSFontDeactivate
.
A result code. See “Apple Type Services for Fonts Result Codes.”
You can use the function ATSFontActivateFromFileSpecification
to activate one font or more fonts. Activating a font makes that font available for use either locally (available only to your application) or globally (available to all applications on the system). A font’s availability—local or global—is referred to as its context.
ATSFont.h
Obtains the file specification for a font. (Deprecated in Mac OS X v10.5. Instead use ATSFontGetFileReference
.)
OSStatus ATSFontGetFileSpecification ( ATSFontRef iFont, ATSFSSpec *oFile );
A reference to the font whose file specification you want to obtain.
On output, points to the file specification that specifies the name and location of a file or directory that contains the font data specified by the iFont
parameter.
A result code. See “Apple Type Services for Fonts Result Codes.”
The function ATSFontGetFileSpecification
obtains the file specification for a font, not the font container. You must call the functions ATSFontActivateFromFileSpecification
or ATSFontActivateFromMemory
to obtain a font container reference.
ATSFont.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-12-11)