diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index a1bdd9d5f4..61197650e7 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -965,6 +965,13 @@ extern const wxCursor *wxGetGlobalCursor(); // from msw/cursor.cpp // GetCursorPos can fail without populating the POINT. This falls back to GetMessagePos. WXDLLIMPEXP_CORE void wxGetCursorPosMSW(POINT* pt); +#if WXWIN_COMPATIBILITY_3_0 +wxDEPRECATED_MSG("Use wxNativeFontInfo::lf directly instead of this private function") +WXDLLIMPEXP_CORE void wxFillLogFont(LOGFONT *logFont, const wxFont *font); +wxDEPRECATED_MSG("Use wxNativeFontInfo(LOGFONT) ctor instead of this private function") +WXDLLIMPEXP_CORE wxFont wxCreateFontFromLogFont(const LOGFONT *logFont); +#endif // WXWIN_COMPATIBILITY_3_0 + WXDLLIMPEXP_CORE void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont& the_font); WXDLLIMPEXP_CORE wxFontEncoding wxGetFontEncFromCharSet(int charset); diff --git a/src/msw/fontutil.cpp b/src/msw/fontutil.cpp index 975ba52a02..b55222a874 100644 --- a/src/msw/fontutil.cpp +++ b/src/msw/fontutil.cpp @@ -264,3 +264,21 @@ wxFontEncoding wxGetFontEncFromCharSet(int cs) return fontEncoding; } + +// ---------------------------------------------------------------------------- +// Deprecated wxFont <-> LOGFONT conversion functions +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_3_0 + +void wxFillLogFont(LOGFONT *logFont, const wxFont *font) +{ + *logFont = font->GetNativeFontInfo()->lf; +} + +wxFont wxCreateFontFromLogFont(const LOGFONT *logFont) +{ + return wxFont(wxNativeFontInfo(*logFont)); +} + +#endif // WXWIN_COMPATIBILITY_3_0