OSDN Git Service

Fix for bug: Gmail (and other places): cursor placed on top of letter
authorRaph Levien <raph@google.com>
Mon, 22 Oct 2012 22:01:17 +0000 (15:01 -0700)
committerRaph Levien <raph@google.com>
Mon, 22 Oct 2012 22:01:17 +0000 (15:01 -0700)
commit42ef515d185d4fc038d602172789cc264f1d9960
tree9f9f497e5cef80745124126af24c9ae20165dad3
parentcc0106cd99831ce7d3715e3c85e5b3e6c5c6ca78
Fix for bug: Gmail (and other places): cursor placed on top of letter

This patch fixes bug 7346656. In this particular case, the text line in
the EditText was split into multiple spans, with the boundary between
the "r" and "," in "r,". These were being drawn as two separate runs,
but measured as a single run, leading to inconsistent measurements
because this is a kern pair in Roboto.

The fix is to eliminate the special-case code for measuring. This will
actually improve efficiency, as the value computed in one pass is now
more likely to be reused in another.

Change-Id: I04142a0ec98f280fc1027c7cbdbf903e3096f8e4
core/java/android/text/TextLine.java