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

# init(glyphName:forFont:baseString:)

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

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

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

## Discussion

---

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)