Protocol

NSGlyphStorage

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

Overview

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

Symbols

Returning text storage

func attributedString()
Required.

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

Returning glyph display options

func layoutOptions()
Required.

Returns the current layout options.

Modifying the glyph cache

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

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

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

Sets a custom attribute value for a given glyph.

Constants

Layout Options

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

Relationships

Adopted By