From: Julian Smart Date: Mon, 4 Dec 2006 10:16:11 +0000 (+0000) Subject: Use font encoding X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/85d3d198c2fa866d39763ace3eebf14c0d164ba7 Use font encoding git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/htmllbox.h b/include/wx/htmllbox.h index 6557e4e036..a7ee460e6f 100644 --- a/include/wx/htmllbox.h +++ b/include/wx/htmllbox.h @@ -74,10 +74,6 @@ public: virtual void RefreshAll(); virtual void SetItemCount(size_t count); - // provide a way to set the default encoding (non-Unicode only) - void SetEncoding(wxFontEncoding encoding) { m_fontEncoding = encoding; } - wxFontEncoding GetEncoding() { return m_fontEncoding; } - #if wxUSE_FILESYSTEM // retrieve the file system used by the wxHtmlWinParser: if you use // relative paths in your HTML, you should use its ChangePathTo() method @@ -171,9 +167,6 @@ private: // HTML parser we use wxHtmlWinParser *m_htmlParser; - // font encoding (used in non-Unicode mode only) - wxFontEncoding m_fontEncoding; - #if wxUSE_FILESYSTEM // file system used by m_htmlParser wxFileSystem m_filesystem; diff --git a/src/generic/htmllbox.cpp b/src/generic/htmllbox.cpp index c4256b2dea..6173b2ef2d 100644 --- a/src/generic/htmllbox.cpp +++ b/src/generic/htmllbox.cpp @@ -225,7 +225,6 @@ void wxHtmlListBox::Init() m_htmlParser = NULL; m_htmlRendStyle = new wxHtmlListBoxStyle(*this); m_cache = new wxHtmlListBoxCache; - m_fontEncoding = wxFONTENCODING_ISO8859_1; } bool wxHtmlListBox::Create(wxWindow *parent, @@ -295,7 +294,8 @@ void wxHtmlListBox::CacheItem(size_t n) const m_htmlParser->SetDC(new wxClientDC(self)); m_htmlParser->SetFS(&self->m_filesystem); #if !wxUSE_UNICODE - m_htmlParser->SetInputEncoding(m_fontEncoding); + if (GetFont().Ok()) + m_htmlParser->SetInputEncoding(GetFont().GetEncoding()); #endif // use system's default GUI font by default: m_htmlParser->SetStandardFonts();