<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaption/Ruby",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptionRuby"
  },
  "title" : "AVCaption.Ruby"
}
-->

# AVCaption.Ruby

An object that presents ruby characters.

```
class Ruby
```

## Overview

Ruby characters are small annotations, typically used in Japanese content, that render alongside the base text.

## Topics

### Creating Ruby text

[`init(text:)`](/documentation/AVFoundation/AVCaption/Ruby/init(text:))

Creates ruby text.

[`init(text:position:alignment:)`](/documentation/AVFoundation/AVCaption/Ruby/init(text:position:alignment:))

Creates ruby text with position and alignment.

### Accessing text properties

[`text`](/documentation/AVFoundation/AVCaption/Ruby/text)

The ruby text.

[`position`](/documentation/AVFoundation/AVCaption/Ruby/position-swift.property)

The ruby text position.

[`AVCaption.Ruby.Position`](/documentation/AVFoundation/AVCaption/Ruby/Position-swift.enum)

Constants that indicate ruby text positions.

[`alignment`](/documentation/AVFoundation/AVCaption/Ruby/alignment-swift.property)

The ruby text alignment.

[`AVCaption.Ruby.Alignment`](/documentation/AVFoundation/AVCaption/Ruby/Alignment-swift.enum)

Constants that indicate ruby text alignments.



---

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)