minor optimizations of draw text to prevent redundant operations