text formatter for smg