fix vertical justification for rotated text

Per request, re-issue of #883.