---
title: "init(characterIdentifier:collection:baseString:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nsglyphinfo/init(characteridentifier:collection:basestring:)"
---

# init(characterIdentifier:collection:baseString:)

Instantiates and returns an NSGlyphInfo object using a character identifier and a character collection.

## Declaration

```swift
init?(characterIdentifier cid: Int, collection characterCollection: NSCharacterCollection, baseString string: String)
```

## Parameters

- `cid`: A character identifier.
- `characterCollection`: A string constant representing a character collection. Possible values are described in doc://com.apple.appkit/documentation/AppKit/NSCharacterCollection.
- `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(glyph:forFont:baseString:)](appkit/nsglyphinfo/init(glyph:forfont:basestring:).md)
- [init(glyphName:forFont:baseString:)](appkit/nsglyphinfo/init(glyphname:forfont:basestring:).md)
- [characterIdentifier](appkit/nsglyphinfo/characteridentifier.md)
- [characterCollection](appkit/nsglyphinfo/charactercollection.md)
- [glyphName](appkit/nsglyphinfo/glyphname.md)
- [NSCharacterCollection](appkit/nscharactercollection.md)
