some improvements for text rendering

Change-Id: Ifa52fbd0f5359c505f12d12281ec7bdfb959d8c5