---
title: "CTFontCreatePathForGlyph(_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontcreatepathforglyph(_:_:_:)"
---

# CTFontCreatePathForGlyph(_:_:_:)

Creates a path for the specified glyph.

## Declaration

```swift
func CTFontCreatePathForGlyph(_ font: CTFont, _ glyph: CGGlyph, _ matrix: UnsafePointer<CGAffineTransform>?) -> CGPath?
```

## Parameters

- `font`: The font reference.
- `glyph`: The glyph.
- `matrix`: An affine transform applied to the path. Can be NULL. If NULL, doc://com.apple.documentation/documentation/CoreGraphics/CGAffineTransformIdentity is used.

## Return Value

Return Value A CGPath object containing the glyph outlines, NULL on error. Must be released by caller.

## Discussion

Discussion Creates a path from the outlines of the glyph for the specified font. The path reflects the font point size, matrix, and transform parameter, applied in that order. The transform parameter is most commonly be used to provide a translation to the desired glyph origin.

## See Also

### Getting Glyph Data

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