Use integer line-height to avoid subsequent round-off errors

Yet another attempt at #3478.

@iwehrman Can you try this branch to see if it fixes the issue for you?