]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/font.cpp
Disable wxUSE_ENH_METAFILE for wxGTK builds.
[wxWidgets.git] / src / gtk / font.cpp
index f2e48c3ca89856a52ea9dbd92f5b79c76dd181d0..e078010efa6dff4faa57ab017ab106bacd18e5e3 100644 (file)
@@ -278,18 +278,20 @@ wxFont::wxFont(const wxNativeFontInfo& info)
         SetStrikethrough(true);
 }
 
         SetStrikethrough(true);
 }
 
-wxFont::wxFont(int pointSize,
-               wxFontFamily family,
-               int flags,
-               const wxString& face,
-               wxFontEncoding encoding)
-{
-    m_refData = new wxFontRefData(pointSize, family,
-                                  GetStyleFromFlags(flags),
-                                  GetWeightFromFlags(flags),
-                                  GetUnderlinedFromFlags(flags),
-                                  GetStrikethroughFromFlags(flags),
-                                  face, encoding);
+wxFont::wxFont(const wxFontInfo& info)
+{
+    m_refData = new wxFontRefData(info.GetPointSize(),
+                                  info.GetFamily(),
+                                  info.GetStyle(),
+                                  info.GetWeight(),
+                                  info.IsUnderlined(),
+                                  info.IsStrikethrough(),
+                                  info.GetFaceName(),
+                                  info.GetEncoding());
+
+    wxSize pixelSize = info.GetPixelSize();
+    if ( pixelSize != wxDefaultSize )
+        SetPixelSize(pixelSize);
 }
 
 bool wxFont::Create( int pointSize,
 }
 
 bool wxFont::Create( int pointSize,