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

# CTFontDrawGlyphs(_:_:_:_:_:)

Renders the given glyphs of a font at the specified positions in the supplied graphics context.

```
func CTFontDrawGlyphs(_ font: CTFont, _ glyphs: UnsafePointer<CGGlyph>, _ positions: UnsafePointer<CGPoint>, _ count: Int, _ context: CGContext)
```

## Parameters

`font`

The font with glyphs to render. If the font has a size or matrix attribute, `context` is set with these values.

`glyphs`

The glyphs to be rendered. The glyphs should be the result of proper Unicode text layout operations (such as with `CTLine`). Functions such as [`CTFontGetGlyphsForCharacters(_:_:_:_:)`](/documentation/CoreText/CTFontGetGlyphsForCharacters(_:_:_:_:)) do not perform any Unicode text layout.

`positions`

The positions (origins) for each glyph in `glyphs`. The positions are in user space. The number of positions passed in must match the number of glyphs (in `glyphs`).

`count`

The number of glyphs to be rendered from the `glyphs` array.

`context`

The graphics context used to render the glyphs.

## Discussion

This function modifies graphics state including font, text size, and text matrix if these attributes are specified in `font`. These attributes are not restored.

---

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)