added wxFontMapper::Get/Set

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-04-06 15:04:27 +00:00
parent 5a224901b8
commit 142b3bc26a
25 changed files with 104 additions and 63 deletions

View File

@@ -632,7 +632,7 @@ void MyFrame::OnViewMsg(wxCommandEvent& WXUNUSED(event))
}
// ok, now get the corresponding encoding
wxFontEncoding fontenc = wxTheFontMapper->CharsetToEncoding(charset);
wxFontEncoding fontenc = wxFontMapper::Get()->CharsetToEncoding(charset);
if ( fontenc == wxFONTENCODING_SYSTEM )
{
wxLogError(wxT("Charset '%s' is unsupported."), charset.c_str());
@@ -642,11 +642,11 @@ void MyFrame::OnViewMsg(wxCommandEvent& WXUNUSED(event))
m_textctrl->LoadFile(filename);
if ( fontenc == wxFONTENCODING_UTF8 ||
!wxTheFontMapper->IsEncodingAvailable(fontenc) )
!wxFontMapper::Get()->IsEncodingAvailable(fontenc) )
{
// try to find some similar encoding:
wxFontEncoding encAlt;
if ( wxTheFontMapper->GetAltForEncoding(fontenc, &encAlt) )
if ( wxFontMapper::Get()->GetAltForEncoding(fontenc, &encAlt) )
{
wxEncodingConverter conv;
@@ -732,7 +732,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
fontInfo.Printf(wxT("Font size is %d points, family: %s, encoding: %s"),
m_font.GetPointSize(),
m_font.GetFamilyString().c_str(),
wxTheFontMapper->
wxFontMapper::Get()->
GetEncodingDescription(m_font.GetEncoding()).c_str());
dc.DrawText(fontInfo, x, y);