+ // do we have the native font info?
+ bool HasNativeFont() const
+ {
+#ifdef __WXGTK20__
+ // we always have a Pango font description
+ return TRUE;
+#else // GTK 1.x
+ // only use m_nativeFontInfo if it had been initialized
+ return !m_nativeFontInfo.IsDefault();
+#endif // GTK 2.0/1.x
+ }
+
+ // setters: all of them also take care to modify m_nativeFontInfo if we
+ // have it so as to not lose the information not carried by our fields
+ void SetPointSize(int pointSize);
+ void SetFamily(int family);
+ void SetStyle(int style);
+ void SetWeight(int weight);
+ void SetUnderlined(bool underlined);
+ void SetFaceName(const wxString& facename);
+ void SetEncoding(wxFontEncoding encoding);
+
+ void SetNoAntiAliasing( bool no = TRUE ) { m_noAA = no; }
+ bool GetNoAntiAliasing() const { return m_noAA; }
+
+ // and this one also modifies all the other font data fields
+ void SetNativeFontInfo(const wxNativeFontInfo& info);
+
+ // debugger helper: shows what the font really is
+ //
+ // VZ: I need this as my gdb either shows wildly wrong values or crashes
+ // when I ask it to "p fontRefData" :-(
+#if defined(__WXDEBUG__) && !defined(__WXGTK20__)
+ void Dump() const
+ {
+ wxPrintf(_T("%s-%s-%s-%d-%d\n"),
+ m_faceName.c_str(),
+ m_weight == wxFONTWEIGHT_NORMAL
+ ? _T("normal")
+ : m_weight == wxFONTWEIGHT_BOLD
+ ? _T("bold")
+ : _T("light"),
+ m_style == wxFONTSTYLE_NORMAL ? _T("regular") : _T("italic"),
+ m_pointSize,
+ m_encoding);
+ }
+#endif // Debug
+