Make <font size> and <font height> in string resources respect density.

This unfortunately requires API changes because the existing text markup
classes had no access to the screen density.

TextPaint gains a "density" field so that TextView can pass the density
along.  AbsoluteSizeSpan gains a new flag to indicate that its argument
is in dip instead of in physical pixels.  LineHeightSpan gains an inner
interface whose chooseHeight() method includes a TextPaint argument so
it can get at the density.  And when StringBlock creates the markup
objects, it now uses the density-aware versions.

Bug 1976971, Bug 2031746
7 files changed