diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h index 848166cff0..26cbbc03ca 100644 --- a/include/wx/fontutil.h +++ b/include/wx/fontutil.h @@ -230,6 +230,9 @@ public: // init with the parameters of the given font void InitFromFont(const wxFont& font) { +#if wxUSE_PANGO + Init(*font.GetNativeFontInfo()); +#else // translate all font parameters SetStyle((wxFontStyle)font.GetStyle()); SetWeight((wxFontWeight)font.GetWeight()); @@ -255,6 +258,7 @@ public: // deal with encoding now (it may override the font family and facename // so do it after setting them) SetEncoding(font.GetEncoding()); +#endif // !wxUSE_PANGO } // accessors and modifiers for the font elements