Carbon


ATSUCreateAndCopyStyle

Header: ATSUnicode.h Carbon status: Supported

Creates a copy of a style object.

OSStatus ATSUCreateAndCopyStyle (
    ATSUStyle iStyle, 
    ATSUStyle *oStyle
);
Parameter descriptions
iStyle

A reference to a style object whose contents you want to copy. You cannot pass NULL for this parameter.

oStyle

On return, a pointer to a reference to a newly-created style object. This style object contains the same style run attribute, font feature, and font variation values (including unset attributes) as those in the style object passed in the iStyle parameter. You cannot pass NULL for this parameter.

function result

A result code.

DISCUSSION

The ATSUCreateAndCopyStyle function creates a style object that contains the contents of the style object in the iStyle parameter, including unset style run attributes, font features, and font variations. It does not copy reference constants. Unset font feature and variation values are assigned default values defined by the font; unset style run attribute values are assigned default values described in “Style Run Attribute Tag Constants”.

If you wish to copy the entire contents of a style object into an existing style object, call the function ATSUCopyAttributes. To copy style run attributes, font features, and font variations that are set in the source but not in the destination style object, call the function ATSUUnderwriteAttributes. To copy style run attributes, font features, and font variations previously set in the source into the destination style object, call the function ATSUOverwriteAttributes.

ATSUCreateAndCopyStyle allocates memory in your application heap, unless you designate a different heap by calling the function ATSUCreateMemorySetting.

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)