How to Create 2-D to 1-D Text Retraction Animation
Animate the offset value.

With the text slected, got to the properties panel, under the text tab(the one with a F icon),  then under the Geometry subsection, animate the offset value.