---
title: "init(cgGlyph:for:baseString:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nsglyphinfo/init(cgglyph:for:basestring:)"
---

# init(cgGlyph:for:baseString:)

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

## Declaration

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

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