![]() |
FNSReferenceGetIndName |
||||
Header: | FontSync.h | Carbon status: | Supported | |
Finds the font name string and other font name parameters for an indexed font name.
OSStatus FNSReferenceGetIndName ( FNSFontReference iReference, ItemCount iFontNameIndex, ByteCount iMaximumNameLength, Ptr oName, ByteCount *oActualNameLength, FontNameCode *oFontNameCode, FontPlatformCode *oFontNamePlatform, FontScriptCode *oFontNameScript, FontLanguageCode *oFontNameLanguage );
A reference to the font reference whose indexed font name you want information about.
An index of the font name you want information about. Pass a value between 0 and one less than the count passed back by the function FNSProfileCountReferences.
The maximum length of the font name. Typically, this is equivalent to the size of the buffer allocated to contain the font name pointed to by the oName parameter. To determine this length, see the discussion below.
A pointer to a buffer. Before calling FNSReferenceGetIndName, pass a pointer to memory that you have allocated for this buffer. If you are uncertain of how much memory to allocate, see the discussion below. On return, the buffer contains the font name string. If the buffer you allocate is not large enough, FNSReferenceGetIndName passes back a partial string.
On return, a pointer to the actual length of the font name string. This may be greater than the value passed in the iMaximumNameLength parameter. You should check this value to make sure that you allocated enough memory for the buffer.
On return, a pointer to the type of the font name string.
On return, a pointer to the encoding of the font name string.
On return, a pointer to the script ID of the font name string.
On return, a pointer to the language of the font name string.
A result code. The result code kFNSBadReferenceVersionErr indicates that a font reference has an unsupported version number. This may indicate that the reference is valid, but created by a later version of FontSync, or that the reference is truly invalid. The result code kFNSInvalidReferenceErr indicates that a font reference is invalid. The result code kFNSInsufficientDataErr indicates that the mask constant kFNSMissingDataNoMatch was set and both references being compared are missing the same data. The result code inputOutOfBounds indicates that the specified index was out of range.
You should call the FNSReferenceGetIndName function to iterate through the entries of a font name table to find the font name string, name code, language code, script code, and platform code of an indexed font name.
The best way to use FNSReferenceGetIndName is to call it twice:
To find the index and font name of the first font in a name table matching given font name parameters, call the function FNSReferenceFindName.
Available beginning with FontSync 1.0.
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)