#endif
#include "wx/fontutil.h"
+#include "wx/fontenum.h"
#include <gtk/gtk.h>
#include "wx/gtk/private/win_gtk.h"
case wxSYS_COLOUR_MAX:
default:
- wxFAIL_MSG( _T("unknown system colour index") );
+ wxFAIL_MSG( wxT("unknown system colour index") );
color = *wxWHITE;
break;
}
+ wxASSERT(color.IsOk());
return color;
}
wxNativeFontInfo info;
info.description = ButtonStyle()->font_desc;
gs_fontSystem = wxFont(info);
+
+#if wxUSE_FONTENUM
+ // (try to) heal the default font (on some common systems e.g. Ubuntu
+ // it's "Sans Serif" but the real font is called "Sans"):
+ if (!wxFontEnumerator::IsValidFacename(gs_fontSystem.GetFaceName()) &&
+ gs_fontSystem.GetFaceName() == "Sans Serif")
+ gs_fontSystem.SetFaceName("Sans");
+#endif // wxUSE_FONTENUM
+
info.description = NULL;
}
font = gs_fontSystem;
default:
break;
}
+
+ wxASSERT( font.IsOk() );
+
return font;
}