---
title: CTRubyAlignment.center
framework: coretext
role: symbol
role_heading: Case
path: coretext/ctrubyalignment/center
---

# CTRubyAlignment.center

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

## Declaration

```swift
case center
```

## Discussion

Discussion If the ruby text is wider than the base text, Core Text centers the base text within the width of the ruby text.

## See Also

### Constants

- [CTRubyAlignment.auto](coretext/ctrubyalignment/auto.md)
- [CTRubyAlignment.start](coretext/ctrubyalignment/start.md)
- [CTRubyAlignment.end](coretext/ctrubyalignment/end.md)
- [CTRubyAlignment.distributeLetter](coretext/ctrubyalignment/distributeletter.md)
- [CTRubyAlignment.distributeSpace](coretext/ctrubyalignment/distributespace.md)
- [CTRubyAlignment.lineEdge](coretext/ctrubyalignment/lineedge.md)
- [CTRubyAlignment.invalid](coretext/ctrubyalignment/invalid.md)
