Carbon


FNSReferenceCreate

Header: FontSync.h Carbon status: Supported

Creates a font reference based on a font object.

OSStatus FNSReferenceCreate (
    FMFont iFont, 
    FNSFontReference *oReference, 
    FNSFontReference *oReference
);
Parameter descriptions
iFont

The font object ID representing the font whose reference you wish to create.

oReference

The desired font reference format version number. Pass a value between the oldest and current format version numbers supported by the FontSync library. You can determine this range by examining the oCurRefVersion and oMinRefVersion fields of the FNSSysInfo structure. This structure is passed back in the ioInfo parameter of the function FNSSysInfoGet. To specify the most recent version supported by the FontSync library regardless of format version, pass the constant kFNSVersionDontCare, described in “Version Constants”.

oReference

On return, a pointer to a reference to the newly-created FontSync reference.

function result

A result code. The result code kFNSBadReferenceVersionErr indicates that you requested an unsupported reference format version. The Font Manager result code kFMInvalidFontErr indicates that a font is invalid. Memory Manager errors indicate that a font reference could not be created because you did not have enough memory available in your heap.

DISCUSSION

You should call the FNSReferenceCreate function to create a font reference if your application uses ATSUI to render text. If the specified font object is associated with a font family, the newly-created font reference will contain the QuickDraw Text-specific information from that associated family.

The FNSReferenceCreate function requires that you specify the desired font reference format version because there will likely be changes to the nature of the “fingerprints” in a font reference in future versions. This allows earlier versions of FontSync to use the font references you create.

VERSION NOTES

Available beginning with FontSync 1.0. In FontSync 1.0, a font object can only belong to one family. FontSync uses the family returned by the Font Manager function FMGetFontFamilyInstanceFromFont.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when Font Sync 1.0 or later is present.


© 2000 Apple Computer, Inc. (Last Updated 7/13/2000)