Contents

glyphIndex(for:in:)

Returns the index of the glyph at the specified location in a text container.

Declaration

func glyphIndex(for point: NSPoint, in container: NSTextContainer) -> Int

Discussion

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