Correctly resize the source of Text.

Fixed issue #50.
Please review, as the logic there is a bit hard for me to follow...