]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/x11/font.h
Make storing non-trivial data in wxThreadSpecificInfo possible.
[wxWidgets.git] / include / wx / x11 / font.h
index b2c8718392aff65d09063dbeea730c10963bb7ce..faa21e4c800dd4a3d1200538d2eae77fa731512b 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     17/09/98
-// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -21,6 +20,20 @@ public:
     // ctors and such
     wxFont() { }
 
+    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());
+    }
+
 #if FUTURE_WXWIN_COMPATIBILITY_3_0
     wxFont(int size,
            int family,