implement PrintToStyledString