Strange behavior about TTF_STYLE_UNDERLINE

You mean, you did TTF_SetFontStyle(font, TTF_STYLE_UNDERLINE), rendered surfaces with text, then called TTF_SetFontStyle(font, TTF_STYLE_NORMAL) and surfaces didn’t change automagically?

both of
set TTF_STYLE_UNDERLINE first
and
set TTF_STYLE_UNDERLINE later

it mean if ever set it at any place, all strings will be displayed with underline.