summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2015-05-28 16:16:24 -0700
committerRaph Levien <raph@google.com>2015-05-28 16:36:36 -0700
commitcb5499c85097450c48f66f6c08a35bab2ad5ab12 (patch)
treef69fc369640cf4cfb8a006c9034391815c684dee /tools/aapt2/java/JavaClassGenerator_test.cpp
parentf981ea95f2e951a558f73fb941cf006423e52627 (diff)
Use getRunAdvance to position cursor
TextLine used to use getTextRunAdvances on a substring to compute a cursor position, but this had a number of problems, especially when the substring is a wider than the full string (as can happen in certain Tamil ligatures). This patch changes the implementation to use getRunAdvance, which was explicitly designed for this use case. We should also change Layout.getHorizontal to use the dual getOffsetForAdvance, but that's basically a performance optimization, the functionality should be basically equivalent. Bug: 21125816 Change-Id: I669b85eaecfbf6f7aa6c6a9dddbf1a210eb94571
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions