fix the rotation matrix for text shapes

Change-Id: I78bf93da4b06f694621e92832773a1abd01256d7