optimize text rendering