Only set bold, italic and underline flags when needed to reduce overhead