The background of the situation:
- I need to render text. Text will be moving aroud the screen and user will have ability to interact with it by erasing with a finger, shifting the order of the words, deleting letters and so on.
- Text will be in many different languages.
- Kering and other typing tricks should be implemented when rendering.
So the problem for me:
I don't know the most efficient way to render all the text AND at the same time to have information about the location of each and every letter on the screen, plus each letter should know the word it belongs.
Now, if I make a big class of strings, where each letter is a child of each word, and words are the children of sentences, then interaction part seems trivial to implement, but rendering becomes a problem since
either I render each letter to the pipeline individually and store it's location in screen coordinates.
or I prepare one big string by gathering letters from all the above mentioned classes and render it in one run, but I loose the ability to store the coordinates of each letter in the screen coodrinates.
Is there a way to have both :) Fast rendering in one string and coodinates of each letter stored?