Get the words in order, and for each word, get its quads. Step through the quads, seeing if the cursor position falls inside one of those quads. If so, you have your word index. More than one word could match if text overlaps.
↧
Get the words in order, and for each word, get its quads. Step through the quads, seeing if the cursor position falls inside one of those quads. If so, you have your word index. More than one word could match if text overlaps.