![]() |
FNSReferenceFindName |
||||
Header: | FontSync.h | Carbon status: | Supported | |
Finds the first name that matches the given font name parameters, if any.
OSStatus FNSReferenceFindName ( FNSFontReference iReference, FontNameCode iFontNameCode, FontPlatformCode iFontNamePlatform, FontScriptCode iFontNameScript, FontLanguageCode iFontNameLanguage, ByteCount iMaximumNameLength, Ptr oName, ByteCount *oActualNameLength, ItemCount *oFontNameIndex );
A reference to the font reference whose font name you are searching for.
The type of the font name string you are searching for.
The encoding of the font name string you are searching for. You can pass the kFontNoPlatform constant if you do not care about the encoding of a font name. In this case, FNSReferenceFindName will pass back the first name matching the other font name parameters.
The script code of the font name string you are searching for. You can pass the kFontNoScript constant if you do not care about the script ID. In this case, FNSReferenceFindName will pass back the first name matching the other font name parameters.
The language code of the font name string you are searching for. You can pass the kFontNoLanguage constant if you do not care about the language of the font name. In this case, FNSReferenceFindName will pass back the first name matching the other font name parameters.
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 FNSReferenceFindName, pass a pointer to memory that you have allocated for this buffer. On return, the buffer contains the font name string. If the buffer you allocate is not large enough, FNSReferenceFindName 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 a 0-based index of the font name in the font name table. This can be used with the function FNSReferenceGetIndName to determine the actual values of unknown font name parameters.
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 kFNSNameNotFoundErr indicates that there was no name in the font reference that matched the given parameters.
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)