Adopted by | |
Framework | /System/Library/Frameworks/AppKit.framework |
Availability | Available in Mac OS X v10.3 and later. |
Declared in | NSGlyphGenerator.h |
Companion guides |
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
.
– insertGlyphs:length:forStartingGlyphAtIndex:characterIndex:
– setIntAttribute:value:forGlyphAtIndex:
Returns the text storage object from which the NSGlyphGenerator
object procures characters for glyph generation.
- (NSAttributedString *)attributedString
The receiver’s text storage object.
NSGlyphGenerator.h
Inserts the given glyphs into the glyph cache and maps them to the specified characters.
- (void)insertGlyphs:(const NSGlyph *)glyphs length:(NSUInteger)length forStartingGlyphAtIndex:(NSUInteger)glyphIndex characterIndex:(NSUInteger)charIndex
The glyphs to insert.
Location in the glyph cache to begin inserting glyphs.
Number of glyphs to insert.
Index of first character to be mapped.
This is a bulk insert method for the glyph cache.
NSGlyphGenerator.h
Returns the current layout options.
- (NSUInteger)layoutOptions
The layout options as a bit mask, as defined in “Constants.”
NSGlyphGenerator.h
Sets a custom attribute value for a given glyph.
- (void)setIntAttribute:(NSInteger)attributeTag value:(NSInteger)val forGlyphAtIndex:(NSUInteger)glyphIndex
The custom attribute.
The new attribute value.
Index of the glyph whose attribute is set.
Custom attributes are glyph attributes such as NSGlyphInscription
or attributes defined by subclasses. Subclasses that define their own custom attributes must override this method and provide their own storage for the attribute values. Nonnegative tags are reserved; you can define your own attributes with negative tags and set values using this method.
NSGlyphGenerator.h
These constants describe layout options returned as a bit mask by the layoutOptions
method.
enum { NSShowControlGlyphs = (1 << 0), NSShowInvisibleGlyphs = (1 << 1), NSWantsBidiLevels = (1 << 2) };
NSShowControlGlyphs
Generates displayable glyphs for control characters.
Available in Mac OS X v10.3 and later.
Declared in NSGlyphGenerator.h
.
NSShowInvisibleGlyphs
Generates displayable glyphs for invisible characters.
Available in Mac OS X v10.3 and later.
Declared in NSGlyphGenerator.h
.
NSWantsBidiLevels
Generates directional formatting codes for bidirectional text.
Available in Mac OS X v10.3 and later.
Declared in NSGlyphGenerator.h
.
NSGlyphGenerator.h
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-01-06)