<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTFontGetAdvancesForGlyphs(_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTFontGetAdvancesForGlyphs"
  },
  "title" : "CTFontGetAdvancesForGlyphs(_:_:_:_:_:)"
}
-->

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

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

```
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

The summed glyph advance of an array of glyphs.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)