]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/font.cpp
Reorder event things a little.
[wxWidgets.git] / src / x11 / font.cpp
index 9cbc28fa1e940031c0757a1f9638e3ead3785810..0c8dc0307db930e73338a695b89f77dc83b7dd46 100644 (file)
@@ -65,7 +65,7 @@ class wxXFont : public wxObject
 {
 public:
     wxXFont();
-    ~wxXFont();
+    virtual ~wxXFont();
 
     WXFontStructPtr     m_fontStruct;   // XFontStruct
     WXDisplay*          m_display;      // XDisplay
@@ -243,23 +243,27 @@ void wxFontRefData::InitFromNative()
             break;
     }
 
+// Not defined in some Pango versions
+#define wxPANGO_WEIGHT_SEMIBOLD 600
+
     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 wxPANGO_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;