Is there any way to obtain the actual character index of the last visible character? In short, I have a teletype effect that I want to have call a function every time it reaches an invisible link tag. So something like:
Of course this doesn’t take invisible characters into account, so I would need either the max visible character’s real index, or the link info’s visible equivalent.
Any help would be much appreciated!
EDIT: Solved for now by just keeping track of all tags and their lengths, but would still love a proper solution for this for future reference
You should be able to use textInfo.lineCount to get the last line. Then last visible character index of that line and lastly, lookup that character in the characterInfo.