Fix text utils for vertical text.

Close #504.
hmm this looks like you fixed a major bug here? im surprised this wasnt causing other failures