improved generic text rendering