]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk1/font.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / gtk1 / font.h
index b5e7e4ea207e6760b4465b302cd8da7c9e1e6d43..b2401521493f082b7d441ce226d23d02201725d3 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        wx/gtk1/font.h
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -32,7 +31,20 @@ public:
     // ctors and such
     wxFont() { }
 
-    // wxGTK-specific
+    wxFont(const wxFontInfo& info)
+    {
+        Create(info.GetPointSize(),
+               info.GetFamily(),
+               info.GetStyle(),
+               info.GetWeight(),
+               info.IsUnderlined(),
+               info.GetFaceName(),
+               info.GetEncoding());
+
+        if ( info.IsUsingSizeInPixels() )
+            SetPixelSize(info.GetPixelSize());
+    }
+
     wxFont(const wxString& fontname)
     {
         Create(fontname);