]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/fontutil.cpp
put vertical space before <pre> section
[wxWidgets.git] / src / unix / fontutil.cpp
index 0da307c8d5a65b5277bb30c4b133d971155a258b..27c2de464aa47c5e354f0c47b275c91642e5f6c6 100644 (file)
@@ -196,6 +196,20 @@ wxString wxNativeFontInfo::ToUserString() const
     return GetXFontName();
 }
 
+wxString wxNativeFontInfo::GetXFontComponent(wxXLFDField field) const
+{
+    wxCHECK_MSG( field < wxXLFD_MAX, _T(""), _T("invalid XLFD field") );
+
+    if ( fontElements[0].empty() )
+    {
+        // const_cast
+        if ( !((wxNativeFontInfo *)this)->FromXFontName(xFontName) )
+            return _T("");
+    }
+
+    return fontElements[field];
+}
+
 bool wxNativeFontInfo::FromXFontName(const wxString& fontname)
 {
     // TODO: we should be able to handle the font aliases here, but how?