Declaration

struct GSWritingDirection

Declaration

enum GSWritingDirection : uint8_t;

Declaration

GSWritingDirection

Overview

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

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

Other

Relationships

Conforms To

  • Swift.BitwiseCopyable
  • Swift.Equatable
  • Swift.ExpressibleByArrayLiteral
  • Swift.OptionSet
  • Swift.RawRepresentable
  • Swift.Sendable
  • Swift.SendableMetatype
  • Swift.SetAlgebra

See Also

Writing Direction