+ m_pointSize = pointSize;
+
+#ifdef __WXGTK20__
+ m_nativeFontInfo.SetPointSize(pointSize);
+#else
+ if ( HasNativeFont() )
+ {
+ wxString size;
+ if ( pointSize == -1 )
+ size = _T('*');
+ else
+ size.Printf(_T("%d"), 10*pointSize);
+
+ m_nativeFontInfo.SetXFontComponent(wxXLFD_POINTSIZE, size);
+ }
+#endif
+}
+
+void wxFontRefData::SetFamily(int family)
+{
+ m_family = family;
+
+ // TODO: what are we supposed to do with m_nativeFontInfo here?
+}
+
+void wxFontRefData::SetStyle(int style)
+{
+ m_style = style;
+
+#ifdef __WXGTK20__
+ m_nativeFontInfo.SetStyle((wxFontStyle)style);
+#else
+ if ( HasNativeFont() )
+ {
+ wxString slant;
+ switch ( style )
+ {
+ case wxFONTSTYLE_ITALIC:
+ slant = _T('i');
+ break;
+
+ case wxFONTSTYLE_SLANT:
+ slant = _T('o');
+ break;
+
+ default:
+ wxFAIL_MSG( _T("unknown font style") );
+ // fall through
+
+ case wxFONTSTYLE_NORMAL:
+ slant = _T('r');
+ }
+
+ m_nativeFontInfo.SetXFontComponent(wxXLFD_SLANT, slant);
+ }
+#endif
+}
+
+void wxFontRefData::SetWeight(int weight)
+{
+ m_weight = weight;
+
+#ifdef __WXGTK20__
+ m_nativeFontInfo.SetWeight((wxFontWeight)weight);
+#else //!__WXGTK20__
+ if ( HasNativeFont() )
+ {
+ wxString boldness;
+ switch ( weight )
+ {
+ case wxFONTWEIGHT_BOLD:
+ boldness = _T("bold");
+ break;
+
+ case wxFONTWEIGHT_LIGHT:
+ boldness = _T("light");
+ break;
+
+ default:
+ wxFAIL_MSG( _T("unknown font weight") );
+ // fall through
+
+ case wxFONTWEIGHT_NORMAL:
+ // unspecified
+ boldness = _T("medium");
+ }
+
+ m_nativeFontInfo.SetXFontComponent(wxXLFD_WEIGHT, boldness);
+ }
+#endif
+}
+
+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;
+
+#ifdef __WXGTK20__
+ m_nativeFontInfo.SetFaceName(facename);
+#else
+ if ( HasNativeFont() )
+ {
+ m_nativeFontInfo.SetXFontComponent(wxXLFD_FAMILY, facename);
+ }
+#endif