---
title: "CTFontGetGlyphWithName(_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontgetglyphwithname(_:_:)"
---

# CTFontGetGlyphWithName(_:_:)

Returns the glyph for the specified name.

## Declaration

```swift
func CTFontGetGlyphWithName(_ font: CTFont, _ glyphName: CFString) -> CGGlyph
```

## Parameters

- `font`: The font reference.
- `glyphName`: The glyph name as a CFString object.

## Return Value

Return Value The glyph value for the named glyph as a CGGlyph object, or if the glyph name is not recognized, the .notdef glyph index value.

## Discussion

Discussion The returned CGGlyph object can be used with any of the subsequent glyph data accessors or directly with Core Graphics.

## See Also

### Getting Glyph Data

- [CTFontCreatePathForGlyph(_:_:_:)](coretext/ctfontcreatepathforglyph(_:_:_:).md)
- [CTFontGetBoundingRectsForGlyphs(_:_:_:_:_:)](coretext/ctfontgetboundingrectsforglyphs(_:_:_:_:_:).md)
- [CTFontGetAdvancesForGlyphs(_:_:_:_:_:)](coretext/ctfontgetadvancesforglyphs(_:_:_:_:_:).md)
- [CTFontGetOpticalBoundsForGlyphs(_:_:_:_:_:)](coretext/ctfontgetopticalboundsforglyphs(_:_:_:_:_:).md)
- [CTFontGetVerticalTranslationsForGlyphs(_:_:_:_:)](coretext/ctfontgetverticaltranslationsforglyphs(_:_:_:_:).md)
