---
title: "CTFontGetAdvancesForGlyphs(_:_:_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontgetadvancesforglyphs(_:_:_:_:_:)"
---

# CTFontGetAdvancesForGlyphs(_:_:_:_:_:)

Calculates the advances for an array of glyphs and returns the summed advance.

## Declaration

```swift
func CTFontGetAdvancesForGlyphs(_ font: CTFont, _ orientation: CTFontOrientation, _ glyphs: UnsafePointer<CGGlyph>, _ advances: UnsafeMutablePointer<CGSize>?, _ count: CFIndex) -> Double
```

## Parameters

- `font`: The font reference.
- `orientation`: The intended drawing orientation of the glyphs. Used to determined which glyph metrics to return.
- `glyphs`: An array of count number of glyphs.
- `advances`: An array of count number of doc://com.apple.documentation/documentation/CoreFoundation/CGSize objects to receive the computed glyph advances. If NULL, only the overall advance is calculated.
- `count`: The capacity of the glyphs and advances buffers.

## Return Value

Return Value The summed glyph advance of an array of glyphs.

## Discussion

Discussion Individual glyph advances are passed back via the advances parameter. These are the ideal metrics for each glyph scaled and transformed in font space.

## See Also

### Getting Glyph Data

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