Carbon


ATSUCopyAttributes

Header: ATSUnicode.h Carbon status: Supported

Copies the contents of a style object into an existing style object.

OSStatus ATSUCopyAttributes (
    ATSUStyle iSourceStyle, 
    ATSUStyle iDestinationStyle
);
Parameter descriptions
iSourceStyle

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

iDestinationStyle

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

function result

A result code.

DISCUSSION

The ATSUCopyAttributes function copies all style run attributes, font features, and font variations from a style object, including default values assigned to unset properties of the style object. 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”.

ATSUCopyAttributes does not copy the contents of memory referenced by pointers or handles within custom style run attributes or within reference constants. You are responsible for ensuring that this memory remains valid until the source style object is disposed of.

If you wish to create a new style object that contains the contents of another style object, call the function ATSUCreateAndCopyStyle. 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.

ATSUCopyAttributes may allocate 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)