![]() |
FNSReferenceMatch |
||||
Header: | FontSync.h | Carbon status: | Supported | |
Compares font references using specified matching options.
OSStatus FNSReferenceMatch ( FNSFontReference iReference1, FNSFontReference iReference2, FNSMatchOptions iOptions, FNSMatchOptions *oFailedMatchOptions );
A font reference whose contents you wish to compare to the font reference in the iReference2 parameter.
A font reference whose contents you wish to compare to the font reference in the iReference1 parameter.
A bit mask you can use to set the match option bits to be used in the font comparison. To specify the global default match criteria, pass the bit mask returned by the function FNSMatchDefaultsGet. Your application can specify options that are different from the users preferences via this mask.
Before calling FNSReferenceMatch, pass NULL if you do not desire to know which match options failed. On return, a pointer to a bit mask that you can test to determine the match options that failed to match in the event of a mismatch.
A result code. The result code kFNSBadReferenceVersionErr indicates that a font reference has an unsupported format version. 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 kFNSMismatchErr indicates that a font reference did not match. The result code kFNSInsufficientDataErr indicates that the mask constant kFNSMissingDataNoMatch was set and both references being compared are missing the same data.
The FNSReferenceMatch function returns a bit mask indicating the matching options that did not match when comparing two font references. You should specify which match options you wish to compare in the iOptions parameter. To specify the default match criteria, pass the bit mask returned by the function FNSMatchDefaultsGet. If the match fails, on return, the oFailedMatchOptions parameter contains a bit mask of the elements that failed to match. You can use the bit mask to determine the criteria under which the fonts failed to match.
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)