From: Vadim Zeitlin Date: Mon, 30 Oct 2006 21:45:10 +0000 (+0000) Subject: handle PANGO_WEIGHT_SEMIBOLD font weight (avoids gcc warnings and generally makes... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/514401354c0f3a3c384535980de05b1c91d78986?ds=sidebyside handle PANGO_WEIGHT_SEMIBOLD font weight (avoids gcc warnings and generally makes sense) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/x11/font.cpp b/src/x11/font.cpp index b1cda1cf23..c5b726de0e 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -246,20 +246,21 @@ void wxFontRefData::InitFromNative() switch (pango_font_description_get_weight( desc )) { case PANGO_WEIGHT_ULTRALIGHT: - m_weight = wxFONTWEIGHT_LIGHT; - break; case PANGO_WEIGHT_LIGHT: m_weight = wxFONTWEIGHT_LIGHT; break; + + default: + wxFAIL_MSG(_T("unknown Pango font weight")); + // fall through + case PANGO_WEIGHT_NORMAL: m_weight = wxFONTWEIGHT_NORMAL; break; + + case PANGO_WEIGHT_SEMIBOLD: case PANGO_WEIGHT_BOLD: - m_weight = wxFONTWEIGHT_BOLD; - break; case PANGO_WEIGHT_ULTRABOLD: - m_weight = wxFONTWEIGHT_BOLD; - break; case PANGO_WEIGHT_HEAVY: m_weight = wxFONTWEIGHT_BOLD; break;