]> git.saurik.com Git - wxWidgets.git/commitdiff
handle PANGO_WEIGHT_SEMIBOLD font weight (avoids gcc warnings and generally makes...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 30 Oct 2006 21:45:10 +0000 (21:45 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 30 Oct 2006 21:45:10 +0000 (21:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/x11/font.cpp

index b1cda1cf236523237cac0a7156e0c946089b0f97..c5b726de0ee426260cb3b0d7892883098aa96a00 100644 (file)
@@ -246,20 +246,21 @@ void wxFontRefData::InitFromNative()
     switch (pango_font_description_get_weight( desc ))
     {
         case PANGO_WEIGHT_ULTRALIGHT:
     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;
         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_NORMAL:
             m_weight = wxFONTWEIGHT_NORMAL;
             break;
+
+        case PANGO_WEIGHT_SEMIBOLD:
         case PANGO_WEIGHT_BOLD:
         case PANGO_WEIGHT_BOLD:
-            m_weight = wxFONTWEIGHT_BOLD;
-            break;
         case PANGO_WEIGHT_ULTRABOLD:
         case PANGO_WEIGHT_ULTRABOLD:
-            m_weight = wxFONTWEIGHT_BOLD;
-            break;
         case PANGO_WEIGHT_HEAVY:
             m_weight = wxFONTWEIGHT_BOLD;
             break;
         case PANGO_WEIGHT_HEAVY:
             m_weight = wxFONTWEIGHT_BOLD;
             break;