Contents

fractionOfDistanceThroughGlyph(for:in:)

Returns the fraction of the distance between the glyph at the specified point and the next glyph.

Declaration

func fractionOfDistanceThroughGlyph(for point: CGPoint, in container: NSTextContainer) -> CGFloat

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