Skip to content
Commit cb5499c8 authored by Raph Levien's avatar Raph Levien
Browse files

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
parent f981ea95
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment