X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b250d38459eb894e7fa87c3328b035a3e43685e1..399b60a0ad232265cd74ce8bf6a53a1f2cc57ff2:/src/html/winpars.cpp diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index a37d1ae346..f358cf14c5 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -29,6 +29,7 @@ #include "wx/html/winpars.h" #include "wx/html/htmlwin.h" #include "wx/fontmap.h" +#include "wx/log.h" //----------------------------------------------------------------------------- @@ -61,6 +62,8 @@ wxHtmlWinParser::wxHtmlWinParser(wxWindow *wnd) : wxHtmlParser() } #ifdef __WXMSW__ static int default_sizes[7] = {7, 8, 10, 12, 16, 22, 30}; +#elif defined(__WXMAC__) + static int default_sizes[7] = {9, 12, 14, 18, 24, 30, 36}; #else static int default_sizes[7] = {10, 12, 14, 16, 19, 24, 32}; #endif @@ -127,14 +130,14 @@ void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const void wxHtmlWinParser::InitParser(const wxString& source) { wxHtmlParser::InitParser(source); - wxASSERT_MSG(m_DC != NULL, _("no DC assigned to wxHtmlWinParser!!")); + wxASSERT_MSG(m_DC != NULL, _T("no DC assigned to wxHtmlWinParser!!")); m_FontBold = m_FontItalic = m_FontUnderlined = m_FontFixed = FALSE; m_FontSize = 3; //default one CreateCurrentFont(); // we're selecting default font into m_DC -> GetTextExtent("H", &m_CharWidth, &m_CharHeight); /* NOTE : we're not using GetCharWidth/Height() because - of differences under X and win + of differences under X and win */ m_UseLink = FALSE; @@ -351,6 +354,8 @@ void wxHtmlWinParser::SetInputEncoding(wxFontEncoding enc) wxFONTENCODING_ISO8859_1 : m_OutputEnc, wxCONVERT_SUBSTITUTE)) { // total failture :-( + wxLogError(_("Failed to display HTML document in %s encoding"), + wxFontMapper::GetEncodingName(enc).mb_str()); m_InputEnc = m_OutputEnc = wxFONTENCODING_DEFAULT; delete m_EncConv; m_EncConv = NULL;