Structure
GSWritingDirection
The progression of glyphs and lines in text.
Declaration
struct GSWritingDirectionDeclaration
enum GSWritingDirection : uint8_t;Declaration
GSWritingDirectionOverview
Writing directions use separate bits for bidirectional text, right-to-left glyph progression, vertical glyph progression, and left-to-right line progression. Use the following complete values for text layout:
Direction | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|
Left-to-right, top-to-bottom | 0 | 0 | 0 | 0 |
Bidirectional | 0 | 0 | 0 | 1 |
Right-to-left, top-to-bottom | 0 | 0 | 1 | 0 |
Top-to-bottom, right-to-left | 0 | 1 | 0 | 0 |
Top-to-bottom, left-to-right | 1 | 1 | 0 | 0 |
Topics
Initializers
Encodes a layout direction as a writing direction.
Instance Properties
Whether the value denotes text without an inherent horizontal direction.
Whether glyphs advance horizontally.
Whether the right-to-left glyph-progression bit is clear.
Whether lines advance to the left in vertical text.
Whether lines advance to the right in vertical text.
Whether glyphs advance right-to-left in horizontal text.
Whether glyphs advance vertically.
Type Properties
No inherent horizontal writing direction.
Selects contextual kerning data.
Glyphs advance left-to-right and lines advance top-to-bottom.
Makes lines advance left-to-right in vertical text.
Glyphs advance right-to-left and lines advance top-to-bottom.
Glyphs advance top-to-bottom and lines advance right-to-left.
Default Implementations
Topics
Enumeration Cases
No inherent horizontal writing direction.
Selects contextual kerning data.
Glyphs advance left-to-right and lines advance top-to-bottom.
Makes lines advance left-to-right in vertical text.
Glyphs advance right-to-left and lines advance top-to-bottom.
Glyphs advance top-to-bottom and lines advance right-to-left.
Other
Encodes a layout direction as a writing direction.
Relationships
Conforms To
Swift.BitwiseCopyableSwift.EquatableSwift.ExpressibleByArrayLiteralSwift.OptionSetSwift.RawRepresentableSwift.SendableSwift.SendableMetatypeSwift.SetAlgebra
See Also
Writing Direction
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.