Support surrogate pairs when layouting text

The current framework does not consider surrogate pairs
when getting the index of the character. This bug becomes
visible when creating the text including Emojis. For
example cursor breaks up when it moves around the Emojis.

Our proposed solution will consider the surrogate pairs
when calculating the index. It will fix not only the Emoji
case, but also the letters that use surrogate pairs.

Change-Id: I4983f2e4df933c8af9d5f0cc27df871e8e10fed4
3 files changed