Rewrite the PrepareImageData methods to check extents, not dims.

The new rendering code using the extent coordinates to control where
drawing occurs. Simply checking the dimensions of the image is not
sufficient.

Change-Id: Ib8185affafdc345b760f6c2164584f8379982a13
Replace the power-of-two scaling with a clearer implementation.

This implementation is easier to read and performed using only integer
operations.

Change-Id: I97ea7e73e6bbaba14b7dc29d26e1db55e57136e4
Merge topic 'freetype-resize-image' into master

40fe9ec0 Replace the power-of-two scaling with a clearer implementation.
41e61435 Rewrite the PrepareImageData methods to check extents, not dims.