Implement textDirection heuristic selection.

Change-Id: I2fcf18de573f2d66494fa5ed61e4273c3c6078c7
15 files changed