func (l *CodeEditorLine) offsets(font gxui.Font) []math.Point { rect := l.Size().Rect().OffsetX(l.caretWidth) runes := l.ce.Controller().LineRunes(l.lineIndex) offsets := font.Layout(&gxui.TextBlock{ Runes: runes, AlignRect: rect, H: gxui.AlignLeft, V: gxui.AlignMiddle, }) l.applyTabWidth(runes, offsets, font) for i, offset := range offsets { offsets[i] = offset.AddX(-l.offset) } return offsets }