OSDN Git Service

Improve text rendering and measurement.
authorDeepanshu Gupta <deepanshu@google.com>
Tue, 7 Jan 2014 19:58:44 +0000 (11:58 -0800)
committerDeepanshu Gupta <deepanshu@google.com>
Fri, 7 Feb 2014 00:27:14 +0000 (16:27 -0800)
commit45dbfcc781a3926d22571b6ccfa3f27ec896f119
tree4ac00a5096da65498311eb0c81e7a900cba26117
parent3bf38b4165877274067a385cfe6472639a203a58
Improve text rendering and measurement.

1. Fix a bug where baseline of the run was modified while rendering
resulting in crooked text in some cases.

2. Use GlyphVector.getLogicalBounds() for text measurement which is more
accurate than getVisualBounds().

3. This change also optimizes text rendering by not computing the advances
for individual glyphs when not needed.

Change-Id: I66792c4d8f50eaf29afa70bccca1e6c812a3fa28
tools/layoutlib/bridge/src/android/graphics/BidiRenderer.java