O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSTypesetter — Mac OS X 10.0

Synopsis

This abstract class provides an interface to objects that NSLayoutManager uses to layout lines in a text container. The Application Kit implements a single concrete subclass of NSTypesetter in NSSimpleHorizontalTypesetter. For more information about Cocoa’s text layout system, see Chapter 5.

image with no caption

@interface NSTypesetter : NSObject
                                  // Class Methods
   + (NSTypesetterBehavior)defaultTypesetterBehavior;
   + (NSSize)printingAdjustmentInLayoutManager:(NSLayoutManager *)layoutMgr
                                 forNominallySpacedGlyphRange:(NSRange)nominallySpacedGlyphsRange
                                 packedGlyphs:(const unsigned char *)packedGlyphs  
                                 count:(unsigned)packedGlyphsCount;
   + (id)sharedSystemTypesetter;
   + (id)sharedSystemTypesetterForBehavior:(NSTypesetterBehavior)theBehavior;
                                  // Instance Methods
   - (float)baselineOffsetInLayoutManager:(NSLayoutManager *)layoutMgr 
                                 glyphIndex:(unsigned)glyphIndex;
   - (void)layoutGlyphsInLayoutManager:(NSLayoutManager *)layoutManager
                                 startingAtGlyphIndex:(unsigned)startGlyphIndex 
                                 maxNumberOfLineFragments:(unsigned)maxNumLines
                                 nextGlyphIndex:(unsigned *)nextGlyph;

Subclasses

NSSimpleHorizontalTypesetter

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required