<!--
{
  "availability" : [
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSGlyphInfo/init(cgGlyph:for:baseString:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSGlyphInfo(cm)glyphInfoWithCGGlyph:forFont:baseString:"
  },
  "title" : "init(cgGlyph:for:baseString:)"
}
-->

# init(cgGlyph:for:baseString:)

Creates a glyph info object from the specified glyph identifier and font informaton.

```
init?(cgGlyph glyph: CGGlyph, for font: NSFont, baseString string: String)
```

## Parameters

`glyph`

The requested <doc://com.apple.documentation/documentation/CoreGraphics/CGGlyph> object.

`font`

The font containing the glyph.

`string`

A string containing the character represented by the glyph.

## Return Value

A glyph info object for the specified glyph or `nil` if the glyph information is not available.

---

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)