The NSGlyphStorage protocol defines the methods that a glyph storage object must implement in order to interact properly with NSGlyphGenerator.


An example of a Cocoa class conforming to the NSGlyphStorage protocol is NSLayoutManager.


Returning text storage

func attributedString()

Returns the text storage object from which the NSGlyphGenerator object procures characters for glyph generation.

Returning glyph display options

func layoutOptions()

Returns the current layout options.

Modifying the glyph cache

func insertGlyphs(UnsafePointer<NSGlyph>, length: Int, forStartingGlyphAt: Int, characterIndex: Int)

Inserts the given glyphs into the glyph cache and maps them to the specified characters.

func setIntAttribute(Int, value: Int, forGlyphAt: Int)

Sets a custom attribute value for a given glyph.


Layout Options

These constants describe layout options returned as a bit mask by the layoutOptions() method.


Adopted By