Minor optimizations in 2D text rendering