Support surrogate pairs when layouting text
authorTakako Ishibashi <takako.x.ishibashi@sonyericsson.com>
Wed, 25 Aug 2010 10:32:00 +0000 (12:32 +0200)
committerJohan Redestig <johan.redestig@sonyericsson.com>
Thu, 26 Aug 2010 06:15:47 +0000 (08:15 +0200)
commit12122bf7929aab7417cda5642632b81e4e15eb4e
tree581812ac0ed744e62bbad37d91d031710148f7cf
parentf3ee6f87a344b185d8bde12c77440c9020378510
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
core/java/android/text/Layout.java [changed mode: 0644->0755]
core/java/android/text/StaticLayout.java [changed mode: 0644->0755]
core/java/android/text/Styled.java [changed mode: 0644->0755]