]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/x11/font.h
fixing overrelease and out-of-bounds write, fixes #13725
[wxWidgets.git] / include / wx / x11 / font.h
index b2c8718392aff65d09063dbeea730c10963bb7ce..a7cabdeb9f5240a8c6091cfecacb425ec471ab2d 100644 (file)
@@ -57,6 +57,19 @@ 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,