---
title: "init(glyphName:forFont:baseString:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nsglyphinfo/init(glyphname:forfont:basestring:)"
---

# init(glyphName:forFont:baseString:)

Instantiates and returns a glyph information object using a glyph name and a specified font.

## Declaration

```swift
init?(glyphName: String, forFont font: NSFont, baseString string: String)
```

## Parameters

- `glyphName`: The name of the glyph.
- `font`: The font object to be associated with the returned NSGlyphInfo object,
- `string`: The part of the attributed string the returned instance is intended to override.

## Return Value

Return Value The created NSGlyphInfo object or nil if the object couldn’t be created.

## See Also

### Deprecated

- [init(characterIdentifier:collection:baseString:)](appkit/nsglyphinfo/init(characteridentifier:collection:basestring:).md)
- [init(glyph:forFont:baseString:)](appkit/nsglyphinfo/init(glyph:forfont:basestring:).md)
- [characterIdentifier](appkit/nsglyphinfo/characteridentifier.md)
- [characterCollection](appkit/nsglyphinfo/charactercollection.md)
- [glyphName](appkit/nsglyphinfo/glyphname.md)
- [NSCharacterCollection](appkit/nscharactercollection.md)
