< Previous PageNext Page > Hide TOC

Deprecated Apple Type Services for Fonts Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.5

ATSFontActivateFromFileSpecification

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
);

Parameters
iFile

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.

iContext

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.

iFormat

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.”

iReserved

An arbitrary 32-bit value. This parameter is currently reserved for future use, so you should pass NULL.

iOptions

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.

oContainer

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.

Return Value

A result code. See “Apple Type Services for Fonts Result Codes.”

Discussion

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.

Availability
Declared In
ATSFont.h

ATSFontGetFileSpecification

Obtains the file specification for a font. (Deprecated in Mac OS X v10.5. Instead use ATSFontGetFileReference.)

OSStatus ATSFontGetFileSpecification (
   ATSFontRef iFont,
   ATSFSSpec *oFile
);

Parameters
iFont

A reference to the font whose file specification you want to obtain.

oFile

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.

Return Value

A result code. See “Apple Type Services for Fonts Result Codes.”

Discussion

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.

Availability
Declared In
ATSFont.h

< Previous PageNext Page > Hide TOC


© 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.