---
title: NSGlyphInfo
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsglyphinfo
---

# NSGlyphInfo

A glyph attribute in an attributed string.

## Declaration

```swift
class NSGlyphInfo
```

## Overview

Overview Glyphs are the graphic representations of characters, stored in a font, that the text system draws on a display or printed page. Before text can be laid out, the layout manager (<NSLayoutManager) generates a stream of glyphs, using the character and font information specified by the attributed string and contained in the font file. NSGlyphInfo represents a glyph attribute value (NSGlyphInfoAttributeName) in an attributed string (NSAttributedString) and provides a means to override the standard glyph generation process and substitute a specified glyph over the attribute’s range. Glyph attributes are integer values that the layout manager uses to denote special handling for particular glyphs during rendering. NSGlyphInfo enables you to override a font’s built-in mapping from a Unicode character code to a corresponding glyph ID. Overriding the mapping allows you to specify a variant glyph for a given character if the font contains multiple variations for that character or to specify a glyph that doesn’t have a standard mapping (such as some ligature glyphs).

## Topics

### Creating a glyph info object

- [init(cgGlyph:for:baseString:)](appkit/nsglyphinfo/init(cgglyph:for:basestring:).md)

### Getting information about a glyph info object

- [baseString](appkit/nsglyphinfo/basestring.md)
- [glyphID](appkit/nsglyphinfo/glyphid.md)

### Deprecated

- [init(characterIdentifier:collection:baseString:)](appkit/nsglyphinfo/init(characteridentifier:collection:basestring:).md)
- [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)

### Initializers

- [init(CGGlyph:forFont:baseString:)](appkit/nsglyphinfo/init(cgglyph:forfont:basestring:).md)
- [init(coder:)](appkit/nsglyphinfo/init(coder:).md)
- [init(glyph:for:baseString:)](appkit/nsglyphinfo/init(glyph:for:basestring:).md)
- [init(glyphName:for:baseString:)](appkit/nsglyphinfo/init(glyphname:for:basestring:).md)

### Default Implementations

- [NSGlyphInfo Implementations](appkit/nsglyphinfo/nsglyphinfo-implementations.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Glyphs

- [NSGlyph](appkit/nsglyph.md)
- [NSGlyphStorage](appkit/nsglyphstorage.md)
- [NSGlyphGenerator](appkit/nsglyphgenerator.md)
- [Reserved Glyph Codes](appkit/reserved-glyph-codes.md)
- [NSFontRenderingMode](appkit/nsfontrenderingmode.md)
