glyphRange(for:)
Returns the range of glyphs lying within the specified text container.
Declaration
func glyphRange(for container: NSTextContainer) -> NSRangeDiscussion
This is a less efficient method than the similar textContainer(forGlyphAt:effectiveRange:).
Performs glyph generation and layout if needed.
See Also
Performing advanced layout queries
boundingRect(forGlyphRange:in:)characterIndex(for:in:fractionOfDistanceBetweenInsertionPoints:)characterRange(forGlyphRange:actualGlyphRange:)enumerateEnclosingRects(forGlyphRange:withinSelectedGlyphRange:in:using:)enumerateLineFragments(forGlyphRange:using:)fractionOfDistanceThroughGlyph(for:in:)getLineFragmentInsertionPoints(forCharacterAt:alternatePositions:inDisplayOrder:positions:characterIndexes:)glyphIndex(for:in:)glyphIndex(for:in:fractionOfDistanceThroughGlyph:)glyphRange(forBoundingRect:in:)glyphRange(forBoundingRectWithoutAdditionalLayout:in:)glyphRange(forCharacterRange:actualCharacterRange:)range(ofNominallySpacedGlyphsContaining:)