Instance Method


Sets the line fragment rectangle where the specified glyphs are laid out.


- (void)setLineFragmentRect:(NSRect)fragmentRect forGlyphRange:(NSRange)glyphRange usedRect:(NSRect)usedRect baselineOffset:(CGFloat)baselineOffset;



The line fragment rectangle where the glyphs in glyphRange are laid out.


The range of the specified glyphs.


The portion of fragmentRect, in the NSTextContainer object’s coordinate system, that actually contains glyphs or other marks that are drawn (including the text container’s line fragment padding). The usedRect must be equal to or contained within fragmentRect.


The vertical distance in pixels from the line fragment origin to the baseline on which the glyphs align.


The exact positions of the glyphs must be set after the line fragment rectangle with setLocation:forStartOfGlyphRange:.

A subclass can override this method to interact with custom glyph storage.

See Also

Interfacing with Glyph Storage

- characterRangeForGlyphRange:actualGlyphRange:

Returns the range for the characters in the receiver’s text store that are mapped to the specified glyphs.

- deleteGlyphsInRange:

Deletes the specified glyphs from the glyph cache maintained by the layout manager.

- substituteGlyphsInRange:withGlyphs:

Replaces the specified glyphs with specified replacement glyphs.

- getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:

Extracts the information needed to lay out the provided glyphs from the provided range.

- glyphRangeForCharacterRange:actualCharacterRange:

Returns the range for the glyphs mapped to the characters of the text store in the specified range.

- insertGlyph:atGlyphIndex:characterIndex:

Enables the typesetter to insert a new glyph into the stream.

- setAttachmentSize:forGlyphRange:

Sets the size the specified glyphs (assumed to be attachments) will be asked to draw themselves at.

- setBidiLevels:forGlyphRange:

Sets the direction of the specified glyphs for bidirectional text.

- setDrawsOutsideLineFragment:forGlyphRange:

Sets whether the specified glyphs exceed the bounds of the line fragment in which they are laid out.

- setLocation:withAdvancements:forStartOfGlyphRange:

Sets the location where the specified glyphs are laid out.

- setNotShownAttribute:forGlyphRange:

Sets whether the specified glyphs are not shown.