X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..aedcc0dc8266fbc73d6bb513bf6c6b0f17932afa:/src/html/winpars.cpp diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index d11a8ea9fd..4a5de2de4d 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -69,14 +69,8 @@ wxHtmlWinParser::wxHtmlWinParser(wxHtmlWindow *wnd) : wxHtmlParser() m_FontsEncTable[i][j][k][l][m] = wxFONTENCODING_DEFAULT; #endif } -#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 - SetFonts(wxT(""), wxT(""), default_sizes); + + SetFonts(wxEmptyString, wxEmptyString, NULL); } // fill in wxHtmlParser's tables: @@ -118,8 +112,22 @@ void wxHtmlWinParser::RemoveModule(wxHtmlTagsModule *module) m_Modules.DeleteObject(module); } -void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) +void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, + const int *sizes) { + static int default_sizes[7] = + { + wxHTML_FONT_SIZE_1, + wxHTML_FONT_SIZE_2, + wxHTML_FONT_SIZE_3, + wxHTML_FONT_SIZE_4, + wxHTML_FONT_SIZE_5, + wxHTML_FONT_SIZE_6, + wxHTML_FONT_SIZE_7 + }; + + if (sizes == NULL) sizes = default_sizes; + int i, j, k, l, m; for (i = 0; i < 7; i++) m_FontsSizes[i] = sizes[i]; @@ -166,7 +174,7 @@ void wxHtmlWinParser::InitParser(const wxString& source) OpenContainer(); OpenContainer(); -#if 0 //!wxUSE_UNICODE +#if !wxUSE_UNICODE wxString charset = ExtractCharsetInformation(source); if (!charset.empty()) {