From 514401354c0f3a3c384535980de05b1c91d78986 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 30 Oct 2006 21:45:10 +0000 Subject: [PATCH] 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 --- src/x11/font.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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; -- 2.45.2