+ m_family = family;
+
+ // TODO: what are we supposed to do with m_nativeFontInfo here?
+}
+
+void wxFontRefData::SetStyle(int style)
+{
+ m_style = style;
+
+#if wxUSE_UNICODE
+ // Get native info
+ PangoFontDescription *desc = m_nativeFontInfo.description;
+
+ switch ( style )
+ {
+ case wxFONTSTYLE_ITALIC:
+ pango_font_description_set_style( desc, PANGO_STYLE_ITALIC );
+ break;
+ case wxFONTSTYLE_SLANT:
+ pango_font_description_set_style( desc, PANGO_STYLE_OBLIQUE );
+ break;
+ default:
+ wxFAIL_MSG( _T("unknown font style") );
+ // fall through
+ case wxFONTSTYLE_NORMAL:
+ pango_font_description_set_style( desc, PANGO_STYLE_NORMAL );
+ break;
+ }
+#endif
+}
+
+void wxFontRefData::SetWeight(int weight)
+{
+ m_weight = weight;
+}
+
+void wxFontRefData::SetUnderlined(bool underlined)
+{
+ m_underlined = underlined;
+
+ // the XLFD doesn't have "underlined" field anyhow
+}
+
+void wxFontRefData::SetFaceName(const wxString& facename)
+{
+ m_faceName = facename;
+}
+
+void wxFontRefData::SetEncoding(wxFontEncoding encoding)
+{
+ m_encoding = encoding;
+}
+
+void wxFontRefData::SetNativeFontInfo(const wxNativeFontInfo& info)
+{
+ // previously cached fonts shouldn't be used
+ ClearX11Fonts();
+
+ m_nativeFontInfo = info;
+
+ // set all the other font parameters from the native font info
+ InitFromNative();
+}
+
+// ----------------------------------------------------------------------------
+// wxFont
+// ----------------------------------------------------------------------------
+
+wxFont::wxFont(const wxNativeFontInfo& info)
+{
+#if wxUSE_UNICODE
+ Create( info.GetPointSize(),
+ info.GetFamily(),
+ info.GetStyle(),
+ info.GetWeight(),
+ info.GetUnderlined(),
+ info.GetFaceName(),
+ info.GetEncoding() );
+#else
+ (void) Create(info.GetXFontName());
+#endif