Fix imbalanced horizontal spacing.

In order to make the horizontal spacing balancing with the original
trailing whitespaces, we now determine the default horizontal
spacing by using the whitespace character ' '.
Use Core Text attributes instead of Cocoa's.

Even though they are identical (at least on OS X 10.8),
since the documentation does not state this,
we prefer the Core Text attributes.
Fix the additional pixel in the background.

The additional line with 1 pixel of height that sometimes
appears is due to the fraction part in the rects.
This issue has been fixed, the fraction parts in calculated
origins and sizes are all removed by using round/floor/ceil.
Fix uneven line spacing in vertical layout.