From fe23b630707f5b5a8647dd034d82539e6d333fef Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 20 Sep 2024 00:47:03 -0400 Subject: [PATCH] Improve doc comment for TypeSetter.AtPosition --- typesetter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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