X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09da4ae594eb84b32095dea53a100f046425f468..9130dfd78408e3e5c2c99740a89201055812d647:/include/wx/fontutil.h diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h index afd564a7b6..4c4b6a7bbe 100644 --- a/include/wx/fontutil.h +++ b/include/wx/fontutil.h @@ -65,7 +65,7 @@ enum wxXLFDField // functions, the user code can only get the objects of this type from // somewhere and pass it somewhere else (possibly save them somewhere using // ToString() and restore them using FromString()) -class WXDLLEXPORT wxNativeFontInfo +class WXDLLIMPEXP_CORE wxNativeFontInfo { public: #if wxUSE_PANGO @@ -105,6 +105,8 @@ public: // set the XFLD void SetXFontName(const wxString& xFontName); #elif defined(__WXMSW__) + wxNativeFontInfo(const LOGFONT& lf_) : lf(lf_) { } + LOGFONT lf; #elif defined(__WXPM__) // OS/2 native structures that define a font @@ -141,8 +143,11 @@ public: wxNativeFontInfo& operator=(const wxNativeFontInfo& info) { - Free(); - Init(info); + if (this != &info) + { + Free(); + Init(info); + } return *this; } #endif // wxUSE_PANGO