]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/osx/font.h
support retina display
[wxWidgets.git] / include / wx / osx / font.h
index fb7fea783a97fc3f9ed0dd82cc31598f2cb4ec28..d5e277f979c0b0e86c09bcf215a736f9a9f3c390 100644 (file)
@@ -37,6 +37,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());
+    }
+
     wxFont( wxOSXSystemFont systemFont );
 
 #if wxOSX_USE_COCOA
@@ -79,19 +93,6 @@ public:
         SetPixelSize(pixelSize);
     }
 
-    wxFont(int pointSize,
-           wxFontFamily family,
-           int flags = wxFONTFLAG_DEFAULT,
-           const wxString& face = wxEmptyString,
-           wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
-    {
-        Create(pointSize, family,
-               GetStyleFromFlags(flags),
-               GetWeightFromFlags(flags),
-               GetUnderlinedFromFlags(flags),
-               face, encoding);
-    }
-
     bool Create(int size,
                 wxFontFamily family,
                 wxFontStyle style,
@@ -121,6 +122,8 @@ public:
     virtual wxFontEncoding GetEncoding() const;
     virtual const wxNativeFontInfo *GetNativeFontInfo() const;
 
+    virtual bool IsFixedWidth() const;
+
     virtual void SetPointSize(int pointSize);
     virtual void SetFamily(wxFontFamily family);
     virtual void SetStyle(wxFontStyle style);