---
title: "CTGlyphInfoCreateWithGlyph(_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctglyphinfocreatewithglyph(_:_:_:)"
---

# CTGlyphInfoCreateWithGlyph(_:_:_:)

Creates an immutable glyph info object with a glyph index.

## Declaration

```swift
func CTGlyphInfoCreateWithGlyph(_ glyph: CGGlyph, _ font: CTFont, _ baseString: CFString) -> CTGlyphInfo?
```

## Parameters

- `glyph`: The index of the glyph.
- `font`: The font to be associated with the returned CTGlyphInfo object.
- `baseString`: The part of the string the returned object is intended to override.

## Return Value

Return Value A valid reference to an immutable CTGlyphInfo object, If glyph info creation was successful; otherwise, NULL.

## Discussion

Discussion This function creates an immutable glyph info object for a glyph index using a specified font.

## See Also

### Creating GlyphInfo Objects

- [CTGlyphInfoCreateWithGlyphName(_:_:_:)](coretext/ctglyphinfocreatewithglyphname(_:_:_:).md)
- [CTGlyphInfoCreateWithCharacterIdentifier(_:_:_:)](coretext/ctglyphinfocreatewithcharacteridentifier(_:_:_:).md)
