X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/142b3bc26a6e93f5857bc053c7748b2c845c4a8e..a536e411022b21280532c9daadc806a437fbb4c6:/src/os2/font.cpp diff --git a/src/os2/font.cpp b/src/os2/font.cpp index 443ec80ee8..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,7 +701,6 @@ void wxNativeFontInfo::SetEncoding( ,&vInfo )) { -#if wxUSE_FONTMAP 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