---
title: "CTRubyAnnotationCreate(_:_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctrubyannotationcreate(_:_:_:_:)"
---

# CTRubyAnnotationCreate(_:_:_:_:)

Creates an immutable ruby annotation object.

## Declaration

```swift
func CTRubyAnnotationCreate(_ alignment: CTRubyAlignment, _ overhang: CTRubyOverhang, _ sizeFactor: CGFloat, _ text: UnsafeMutablePointer<Unmanaged<CFString>?>) -> CTRubyAnnotation
```

## Parameters

- `alignment`: An alignment value that specifies how the ruby text and the base text align relative to each other.
- `overhang`: An overhang value that specifies how the ruby text overhangs adjacent characters.
- `sizeFactor`: A size factor that specifies the annotation text size as a percentage of the base text size.
- `text`: An array of doc://com.apple.documentation/documentation/CoreFoundation/CFString objects, indexed by doc://com.apple.coretext/documentation/CoreText/CTRubyPosition. Pass in NULL for any unused positions.

## Return Value

Return Value A reference to a CTRubyAnnotation object.

## Discussion

Discussion Use this function to create a ruby annotation object in the most straightforward and efficient way.

## See Also

### Functions

- [CTFontDescriptorMatchFontDescriptorsWithProgressHandler(_:_:_:)](coretext/ctfontdescriptormatchfontdescriptorswithprogresshandler(_:_:_:).md)
- [CTFontManagerCompareFontFamilyNames(_:_:_:)](coretext/ctfontmanagercomparefontfamilynames(_:_:_:).md)
- [CTFontManagerCopyAvailableFontFamilyNames()](coretext/ctfontmanagercopyavailablefontfamilynames().md)
- [CTFontManagerCopyAvailableFontURLs()](coretext/ctfontmanagercopyavailablefonturls().md)
- [CTFontManagerCopyAvailablePostScriptNames()](coretext/ctfontmanagercopyavailablepostscriptnames().md)
- [CTFontManagerCreateFontDescriptorFromData(_:)](coretext/ctfontmanagercreatefontdescriptorfromdata(_:).md)
- [CTFontManagerCreateFontDescriptorsFromURL(_:)](coretext/ctfontmanagercreatefontdescriptorsfromurl(_:).md)
- [CTFontManagerCreateFontRequestRunLoopSource(_:_:)](coretext/ctfontmanagercreatefontrequestrunloopsource(_:_:).md)
- [CTFontManagerEnableFontDescriptors(_:_:)](coretext/ctfontmanagerenablefontdescriptors(_:_:).md)
- [CTFontManagerGetAutoActivationSetting(_:)](coretext/ctfontmanagergetautoactivationsetting(_:).md)
- [CTFontManagerGetScopeForURL(_:)](coretext/ctfontmanagergetscopeforurl(_:).md)
- [CTFontManagerIsSupportedFont(_:)](coretext/ctfontmanagerissupportedfont(_:).md)
- [CTFontManagerRegisterFontsForURL(_:_:_:)](coretext/ctfontmanagerregisterfontsforurl(_:_:_:).md)
- [CTFontManagerRegisterFontsForURLs(_:_:_:)](coretext/ctfontmanagerregisterfontsforurls(_:_:_:).md)
- [CTFontManagerRegisterGraphicsFont(_:_:)](coretext/ctfontmanagerregistergraphicsfont(_:_:).md)
