<!--
{
  "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/CTFontGetGlyphsForCharacters(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTFontGetGlyphsForCharacters"
  },
  "title" : "CTFontGetGlyphsForCharacters(_:_:_:_:)"
}
-->

# CTFontGetGlyphsForCharacters(_:_:_:_:)

Performs basic character-to-glyph mapping.

```
func CTFontGetGlyphsForCharacters(_ font: CTFont, _ characters: UnsafePointer<UniChar>, _ glyphs: UnsafeMutablePointer<CGGlyph>, _ count: CFIndex) -> Bool
```

## Parameters

`font`

The font reference.

`characters`

An array of Unicode characters.

`glyphs`

On output, points to an array of glyph values.

`count`

The capacity of the character and glyph arrays.

## Return Value

`True` if the font could encode all Unicode characters; otherwise `False`.

## Discussion

Provides basic Unicode encoding for the given font, returning by reference an array of <doc://com.apple.documentation/documentation/CoreGraphics/CGGlyph> values corresponding to a given array of Unicode characters for the given font.

If a glyph could not be encoded, a value of `0` is passed back at the corresponding index in the `glyphs` array and the function returns `False`. It is the responsibility of the caller to handle the Unicode properties of the input characters.

---

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)