Carbon


ATSUGetAllFontVariations

Header: ATSUnicode.h Carbon status: Supported

Obtains font variation information from a style object.

OSStatus ATSUGetAllFontVariations (
    ATSUStyle iStyle, 
    ItemCount iVariationCount, 
    ATSUFontVariationAxis oVariationAxes[], 
    ATSUFontVariationValue oFontVariationValues[], 
    ItemCount *oActualVariationCount
);
Parameter descriptions
iStyle

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

iVariationCount

The maximum number of font variations in the style object. Typically, this is equivalent to the number of font variation axes in the ATSUFontVariationAxis array. To determine this value, see the discussion below.

oVariationAxes

An array of font variation axes. Before calling ATSUGetAllFontVariations, 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 the previously set font variation axes in the style object.

oFontVariationValues

An array of font variation values. Before calling ATSUGetAllFontVariations, pass a pointer to memory that you have allocated for this array. If you are uncertain about how much memory to allocate, see the discussion below. On return, an array of the previously set font variation values that correspond to the font variation axes passed back in the oVariationAxes array.

oActualVariationCount

On return, a pointer to the actual number of font variations set in the style object. This may be greater than the value passed in the iVariationCount parameter. You cannot pass NULL for this parameter.

function result

A result code.

DISCUSSION

The ATSUGetAllFontVariations function determines the variations and axes corresponding to all previously set font variations contained in a style object. You can obtain a particular variation value by passing its corresponding variation axis to the function ATSUGetFontVariationValue.

The best way to use ATSUGetAllFontVariations is to call it twice:

  1. Pass a reference to the style object containing the font variation in the iStyle parameter, NULL for the oVariationAxes and oATSUFontVariationValues parameters, and 0 for the other parameters. ATSUGetAllFontVariations returns the size of the axes and value arrays in the oActualVariationCount parameter.
  2. Allocate enough space for an array of the returned size, then call the function again, passing pointers in the oVariationAxes and oATSUFontVariationValues parameters. On return, the pointers point to arrays of the font variation axes and corresponding values, 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)