Carbon


ATSUGetAllFontFeatures

Header: ATSUnicode.h Carbon status: Supported

Obtains font feature information from a style object.

OSStatus ATSUGetAllFontFeatures (
    ATSUStyle iStyle, 
    ItemCount iMaximumFeatureCount, 
    ATSUFontFeatureType oFeatureType[], 
    ATSUFontFeatureSelector oFeatureSelector[], 
    ItemCount *oActualFeatureCount
);
Parameter descriptions
iStyle

A reference to a valid style object whose font feature information you want to obtain. You cannot pass NULL for this parameter.

iMaximumFeatureCount

The maximum number of feature types and selectors in the style object. Typically, this is equivalent to the number of feature types in the oFeatureType array. To determine this value, see the discussion below.

oFeatureType

An array of font feature types. Before calling ATSUGetAllFontFeatures, pass a pointer to memory that you have allocated for this array. If you are uncertain of how much memory to allocate, see the discussion below. On return, an array of font feature types that have been set in the style object.

oFeatureSelector

An array of font feature selectors. Before calling ATSUGetAllFontFeatures, pass a pointer to memory that you have allocated for this array. If you are uncertain of how much memory to allocate, see the discussion below. On return, an array of font feature selectors that have been set in the style object.

oActualFeatureCount

On return, a pointer to the actual number of font feature types and selectors in the style object. This may be greater than the value you passed in the iMaximumFeatureCount parameter. You cannot pass NULL for this parameter.

function result

A result code.

DISCUSSION

The ATSUGetAllFontFeatures function determines all previously set font feature selectors and types contained in a style object. The best way to use ATSUGetAllFontFeatures is to call it twice:

  1. Pass a reference to the style object containing the font feature in the iStyle parameter, NULL for the oFeatureType and oFeatureSelector parameters, and 0 for the other parameters. ATSUGetAllFontFeatures returns the sizes of the feature type and selector arrays in the oActualFeatureCount parameter.
  2. Allocate enough space for an array of the returned size, then call the function again, passing a pointer in the oFeatureType and oFeatureSelector parameters. On return, the pointers point to arrays of the font feature types and selectors, respectively, contained in the 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)