Tidy up highlight calculation.

Use the bounds from the logical highlight shape, rather than
calculating everything from scratch using the text metrics.
Merge pull request #77 from csmith/master

Tidy up highlight calculation.