![]() |
Text Layout Attribute Tag Constants |
Header: ATSUnicode.h |
enum { kATSULineWidthTag = 1, kATSULineRotationTag = 2, kATSULineDirectionTag = 3, kATSULineJustificationFactorTag = 4, kATSULineFlushFactorTag = 5, kATSULineBaselineValuesTag = 6, kATSULineLayoutOptionsTag = 7, kATSULineAscentTag = 8, kATSULineDescentTag = 9, kATSULineLangRegionTag = 10, kATSULineTextLocatorTag = 11, kATSUMaxLineTag = 12, kATSULineLanguageTag = 10 };
Identifies the line width attribute. You use this tag to set or obtain a value of type
Identifies the line rotation attribute. You use this tag to set or obtain a value of type Fixed that represents the angle of line rotation (in units of degrees) to impose on a line of a text layout object. Values can range from -1.0 to 1.0. A value of 0 indicates no line rotation. Negative values rotate the line clockwise, while positive values rotate the line counterclockwise. If you do not set the attribute value corresponding to this tag, the default value is 0, and ATSUI does not impose line rotation. Available with ATSUI 1.0.
Identifies the line direction attribute. You use this tag to set or obtain a value of type Boolean that represents the line direction to impose on every line of a text layout object. You cannot set line direction for a single line. See
Identifies the line justification attribute. You use this tag to set or obtain a value of type Fract that represents the justification to impose on a line of a text layout object. Values can range from 0 to 1. See
Identifies the line alignment attribute. You use this tag to set or obtain a value of type Fract that represents the alignment to impose on a line of a text layout object. If you set the line alignment attribute, you must also set line justification attribute for the corresponding line(s). Values can range from 0 to 1. See
Identifies the baseline positions attribute. You use this tag to set or obtain an array of type ATSUCalculateBaselineDeltas
and pass the style object corresponding to the dominant style run in the line. If you do not set the attribute value corresponding to this tag, the default value is an empty array, and ATSUI uses the font-defined cross-stream shift for each glyph in the line. Available with ATSUI 1.0.
Identifies the line layout options attribute. You use this tag to set or obtain a 32-bit mask value of type ATSLineLayoutOptions that controls line layout options for a single line or each line of a text layout object. See
Identifies the line ascent attribute. You use this tag to set or obtain a value of type ATSUHighlightText
and
Identifies the line descent attribute. You use this tag to set or obtain a value of type ATSUHighlightText
and
Identifies the text locator attribute. You use this tag to set or obtain a value of type
Identifies the maximum value for Apple-defined text layout attribute tags. Available with ATSUI 1.2.
Identifies the language attribute for a line. You use this tag to set or obtain a value of type RegionCode that represents the regional language and other region-dependent characteristics for glyphs in a line of a text layout object. See Region Code Constants in the Script Manager for a description of possible values. If you do not set the attribute value corresponding to this tag, the default value is kTextRegionDontCare, and ATSUI uses the region code of the system script. To determine this value, evaluate the result of GetScriptVariable (smSystemScript,smScriptLang). Available with ATSUI 1.2.
You can pass a text layout attribute tag constant of type ATSUAttributeTag to the functions ATSUSetLayoutControls, ATSUGetLayoutControl, ATSUGetAllLayoutControls, and ATSUClearLayoutControls to identify the text layout attribute value you wish to set, obtain, or remove from a text layout object. If you do not set a text layout attribute, it will be set to its default value.
You can also pass these tag constants to the ATSUI functions ATSUSetLineControls, ATSUGetLineControl, ATSUGetAllLineControls, and ATSUClearLineControls to identify the text layout attribute value you wish to set, obtain, or remove from a single line in a text layout object. Note that when you set a text layout attribute value for a line, this value will override the value of the text layout attribute set for the text layout object containing the line. This is true even if the attributes for the line are set before those of the entire text layout object containing the line.
The ATSUAttributeTag type also defines style run attribute tag constants; see
These constant descriptions assume horizontal text. If you are setting or getting the text layout attribute of vertical text, you should interpret these values accordingly.
This enumeration is available beginning with ATSUI 1.0. Additional constants added with ATSUI 1.1 and 1.2.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)