X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a09cd1895ece68cbc4562cbc6aa104affb6071f8..6d94009faa51ae4018e08ced13cfdfe575b03f08:/src/common/fontmap.cpp?ds=sidebyside diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index 3920675618..be05e44b85 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -51,6 +51,7 @@ #include "wx/msgdlg.h" #include "wx/fontdlg.h" #include "wx/choicdlg.h" +#include "wx/encinfo.h" #include "wx/encconv.h" @@ -162,6 +163,19 @@ wxFontMapper::~wxFontMapper() { } +bool wxFontMapper::IsWxFontMapper() +{ return true; } + +/* static */ +wxFontMapper *wxFontMapper::Get() +{ + wxFontMapperBase *fontmapper = wxFontMapperBase::Get(); + wxASSERT_MSG(fontmapper->IsWxFontMapper(), wxT("GUI code requested a wxFontMapper but we only have a wxFontMapperBase.")); + // Now return it anyway because there's a chance the GUI code might just + // only want to call wxFontMapperBase functions. + return (wxFontMapper*)fontmapper; +} + wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, bool interactive) {