if (attr.HasFlag(wxTEXT_ATTR_FONT))
attr.SetFont(* wxTheFontList->FindOrCreateFont(fontSize, fontFamily, fontStyle, fontWeight, fontUnderlined, fontFacename));
// Restore correct font flags
attr.SetFlags(fontFlags);
if (attr.HasFlag(wxTEXT_ATTR_FONT))
attr.SetFont(* wxTheFontList->FindOrCreateFont(fontSize, fontFamily, fontStyle, fontWeight, fontUnderlined, fontFacename));
// Restore correct font flags
attr.SetFlags(fontFlags);