glyphIndex(for:in:)
Returns the index of the glyph at the specified location in a text container.
Declaration
func glyphIndex(for point: CGPoint, in container: NSTextContainer) -> IntDiscussion
This method is a primitive for glyphIndex(for:in:fractionOfDistanceThroughGlyph:). You should always call the main method, not the primitives.
Overriding should be done for the primitive methods. Existing subclasses that do not do this overriding will not have their implementations available to Java developers.
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:fractionOfDistanceThroughGlyph:)glyphRange(forBoundingRect:in:)glyphRange(forBoundingRectWithoutAdditionalLayout:in:)glyphRange(for:)glyphRange(forCharacterRange:actualCharacterRange:)range(ofNominallySpacedGlyphsContaining:)