diff --git a/typesetter.go b/typesetter.go index f5e38d2..3ddcf5b 100644 --- a/typesetter.go +++ b/typesetter.go @@ -89,7 +89,8 @@ type TypeSetter struct { layoutBoundsSpace fixed.Rectangle26_6 } -// AtPosition returns the index of the rune at the specified position. +// AtPosition returns the index of the rune at the specified position. The +// returned index may be greater than the length of runes in the TypeSetter. func (this *TypeSetter) AtPosition (position fixed.Point26_6) int { metrics := this.face.Metrics() lastValidIndex := 0