<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTRubyAlignment",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@E@CTRubyAlignment"
  },
  "title" : "CTRubyAlignment"
}
-->

# CTRubyAlignment

Constants that specify how to align the ruby text and the base text relative to each other when they have different lengths.

```
enum CTRubyAlignment
```

## Topics

### Constants

[`CTRubyAlignment.auto`](/documentation/CoreText/CTRubyAlignment/auto)

Core Text automatically determines the alignment.

[`CTRubyAlignment.start`](/documentation/CoreText/CTRubyAlignment/start)

Aligns the ruby text with the starting edge of the base text.

[`CTRubyAlignment.center`](/documentation/CoreText/CTRubyAlignment/center)

Centers the ruby text within the width of the base text.

[`CTRubyAlignment.end`](/documentation/CoreText/CTRubyAlignment/end)

Aligns the ruby text with the ending edge of the base text.

[`CTRubyAlignment.distributeLetter`](/documentation/CoreText/CTRubyAlignment/distributeLetter)

Distributes the ruby text evenly over the width of the base text, aligning the first and last characters of the ruby text with the first and last characters of the base text.

[`CTRubyAlignment.distributeSpace`](/documentation/CoreText/CTRubyAlignment/distributeSpace)

Distributes the ruby text evenly over the width of the base text, adding space before the first and after the last character.

[`CTRubyAlignment.lineEdge`](/documentation/CoreText/CTRubyAlignment/lineEdge)

Aligns the ruby text to an adjacent line edge.

[`CTRubyAlignment.invalid`](/documentation/CoreText/CTRubyAlignment/invalid)

The alignment is invalid.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)