---
title: "setRuby(_:in:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutablecaption/setruby(_:in:)"
---

# setRuby(_:in:)

Sets ruby text for a range.

## Declaration

```swift
@nonobjc func setRuby(_ rubyText: AVCaption.Ruby, in range: NSRange)
```

## Parameters

- `rubyText`: The ruby text.
- `range`: The range to which the ruby text applies.

## See Also

### Configuring advanced typography

- [AVCaption.Ruby](avfoundation/avcaption/ruby.md)
- [removeRuby(in:)](avfoundation/avmutablecaption/removeruby(in:).md)
- [AVCaption.TextCombine](avfoundation/avcaption/textcombine.md)
- [setTextCombine(_:in:)](avfoundation/avmutablecaption/settextcombine(_:in:).md)
- [removeTextCombine(in:)](avfoundation/avmutablecaption/removetextcombine(in:).md)
