Carbon


FNSProfileCreate

Header: FontSync.h Carbon status: Supported

Creates an empty font profile.

OSStatus FNSProfileCreate (
    const FSSpec *iFile, 
    FourCharCode iCreator, 
    ItemCount iEstNumRefs, 
    FNSFontProfile *oProfile, 
    FNSFontProfile *oProfile
);
Parameter descriptions
iFile

A pointer to the file that you want to initialize as an empty font profile.

iCreator

The creator code to set for the file. To specify the file creator code assigned by FontSync, pass the kFNSCreatorDefault constant, described in “Font Profile Constants”.

iEstNumRefs

The estimated number of font references that the font profile will contain. Estimating this value minimizes the number of times the file needs to be grown, since the new profile will usually immediately have font references added to it. Pass 0 if you don’t know how many font references your profile will contain.

oProfile

The desired format version of the font profile. Pass a value in the range returned by the function FNSSysInfoGet in the oCurProfileVersion and oMinProfileVersion fields of the system information structure. To specify the most recent version supported by the FontSync library regardless of format version, pass the constant kFNSVersionDontCare, described in “Version Constants”.

oProfile

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

function result

A result code. The result code kFNSBadProfileVersionErr indicates that you requested an unsupported profile format version. Memory Manager errors indicate that the font profile could not be created because you did not have enough memory available in your heap. FNSProfileCreate may return File Manager errors.

DISCUSSION

The FNSProfileCreate function creates an empty file containing a FontSync font profile. The newly-created font profile is ready for use. You can add font references to the profile by calling the function FNSProfileAddReference.

FNSProfileCreate requires that you specify the desired profile version format because there will likely be changes to the profile file format in future versions. This allows earlier versions of FontSync to use the font profils you create.

VERSION NOTES

Available beginning with FontSync 1.0. In FontSync 1.0, if you specify the constant kFNSCreatorDefault in the iCreator parameter of the function FNSProfileCreate, FontSync assigns the creator code 'fns'

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)