X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a15e8ba7aa7800427ac4118f434e827f33dd73a..3f93a7508ea292a0ba836eefcccf20a716eaf135:/src/gtk/font.cpp diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index 9e42fdf9e6..e174e7c2d0 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -15,10 +15,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "font.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -239,37 +235,11 @@ void wxFontRefData::InitFromNative() // Pango sometimes needs to have a size int pango_size = pango_font_description_get_size( desc ); if (pango_size == 0) - pango_font_description_set_size( desc, 12 * PANGO_SCALE); - - m_pointSize = pango_font_description_get_size( desc ) / PANGO_SCALE; - - switch (pango_font_description_get_style( desc )) - { - case PANGO_STYLE_NORMAL: - m_style = wxFONTSTYLE_NORMAL; - break; - case PANGO_STYLE_ITALIC: - m_style = wxFONTSTYLE_ITALIC; - break; - case PANGO_STYLE_OBLIQUE: - m_style = wxFONTSTYLE_SLANT; - break; - } - - PangoWeight pango_weight = pango_font_description_get_weight( desc ); + m_nativeFontInfo.SetPointSize(12); - if (pango_weight >= 600) - { - m_weight = wxFONTWEIGHT_BOLD; - } - else if (pango_weight < 350) - { - m_weight = wxFONTWEIGHT_LIGHT; - } - else - { - m_weight = wxFONTWEIGHT_NORMAL; - } + m_pointSize = m_nativeFontInfo.GetPointSize(); + m_style = m_nativeFontInfo.GetStyle(); + m_weight = m_nativeFontInfo.GetWeight(); if (m_faceName == wxT("monospace")) {