X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2c1e8f2ec2400f618468e72f2faf32373f53a4c9..a6dfe11fefaec5179d9af6a0ec2e78d9388ee5a3:/src/os2/font.cpp?ds=sidebyside diff --git a/src/os2/font.cpp b/src/os2/font.cpp index c1839db1ca..49aaf4ccdc 100644 --- a/src/os2/font.cpp +++ b/src/os2/font.cpp @@ -371,6 +371,8 @@ bool wxFontRefData::Alloc( long lRc; short nIndex = 0; PFONTMETRICS pFM = NULL; + ERRORID vError; + wxString sError; if (!m_bNativeFontInfoOk) { @@ -396,6 +398,8 @@ bool wxFontRefData::Alloc( } if (!m_hFont) { + vError = ::WinGetLastError(vHabmain); + sError = wxPMErrorToStr(vError); wxLogLastError("CreateFont"); } @@ -496,10 +500,6 @@ void wxFontRefData::Free() if ( m_hFont ) { - if (!::GpiSetCharSet(m_hPS, LCID_DEFAULT)) - { - wxLogLastError(wxT("DeleteObject(font)")); - } ::GpiDeleteSetId(m_hPS, 1L); /* delete the logical font */ m_nFontId = 0; m_hFont = 0; @@ -701,8 +701,7 @@ void wxNativeFontInfo::SetEncoding( ,&vInfo )) { -#if wxUSE_FONTMAP - if (wxTheFontMapper->GetAltForEncoding( eEncoding + if (wxFontMapper::Get()->GetAltForEncoding( eEncoding ,&vInfo )) { @@ -717,7 +716,6 @@ void wxNativeFontInfo::SetEncoding( } } else -#endif // wxUSE_FONTMAP { // unsupported encoding, replace with the default vInfo.charset = 850; @@ -1119,5 +1117,5 @@ void wxFont::SetPS( M_FONTDATA->SetPS(hPS); RealizeResource(); -} // end of wxFont::SetUnderlined +} // end of wxFont::SetPS