Carbon


ATSUGetFontFeatureSelectors

Header: ATSUnicode.h Carbon status: Supported

Obtains a list of the available feature selectors for a given feature type in a font.

OSStatus ATSUGetFontFeatureSelectors (
    ATSUFontID iFont, 
    ATSUFontFeatureType iType, 
    ItemCount iMaximumSelectors, 
    ATSUFontFeatureSelector oSelectors[], 
    Boolean oSelectorIsOnByDefault[], 
    ItemCount *oActualSelectorCount, 
    Boolean *oIsMutuallyExclusive
);
Parameter descriptions
iFont

The ID of the font for whose feature type you want to count the number of feature selectors.

iType

A valid feature type whose font selectors you want to determine.

iMaximumSelectors

The maximum number of feature selectors in the font. Typically, this is equivalent to the number of elements in the oSelectors array.

oSelectors

An array of feature selectors. Before calling ATSUGetFontFeatureSelectors, pass a pointer to memory that you have allocated for this array. You should allocate enough memory to contain the number of font feature types passed back in the oSelectorCount parameter of the function ATSUCountFontFeatureSelectors. On return, an array of the feature selectors available for a given feature type. You cannot pass NULL for this parameter.

oSelectorIsOnByDefault

An array of Boolean values. Before calling ATSUGetFontFeatureSelectors, pass a pointer to memory that you have allocated for this array. On return, an array of values indicating whether the corresponding feature selector is on. If true, the feature selector is on by default. You cannot pass NULL for this parameter.

oActualSelectorCount

On return, a pointer to the actual number of feature selectors defined for a given feature type in a font. This may be greater than the value passed in the iMaximumSelectors parameter. You cannot pass NULL for this parameter.

oIsMutuallyExclusive

On return, a pointer to a value that indicates whether more than one font feature selector can be on at once. If true, only one selector can be used at a time. You cannot pass NULL for this parameter.

function result

A result code. The result code kATSUInvalidFontErr indicates that the ID does not correspond to any installed font.

DISCUSSION

The ATSUGetFontFeatureSelectors function obtains a list of feature selectors for a given feature type in a font. You can use this information to set the font features and selectors in a style object.

VERSION NOTES

Available beginning with ATSUI 1.0.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.5 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)