API Collection
Layout and Writing Direction
A resolved combination of character and line directions.
Overview
A layout direction specifies how characters progress within a line and how successive lines progress through the layout. The character direction determines the layout orientation: horizontal characters form a horizontal layout, while top-to-bottom characters form a vertical layout.
Layout direction | Orientation | Character direction | Line direction |
|---|---|---|---|
Horizontal | Left-to-right | Top-to-bottom | |
Horizontal | Right-to-left | Top-to-bottom | |
Vertical | Top-to-bottom | Left-to-right | |
Vertical | Top-to-bottom | Right-to-left |
Use orientationGSLayoutOrientationFromLayoutDirectionGSLayoutOrientationFromLayoutDirection to determine whether the horizontal direction applies to characters or lines. For a horizontal layout, horizontalDirectionGSHorizontalLayoutDirectionFromLayoutDirectionGSHorizontalLayoutDirectionFromLayoutDirection is the character direction. For a vertical layout, it is the line direction.
Writing Directions
GSWritingDirection is an option-set encoding used by APIs that can carry an unresolved or special direction. Convert it to GSLayoutDirection before using it for resolved layout.
Topics
Layout Directions
A resolved combination of character and line directions.
Layout Orientation
The axis along which characters progress.
Returns the axis along which characters progress.
Horizontal Layout Directions
A direction of progression along the horizontal axis.
Returns the progression along the horizontal axis.
Writing Direction
The progression of glyphs and lines in text.
Whether a value contains only recognized writing-direction and kerning-selector bits.
A value containing only recognized bits, or leftToRightGSWritingDirectionLeftToRightGSWritingDirectionLeftToRight when the value contains an unsupported bit.