X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11c7d5b6d1cb54d5ffdc11d8ff092b41e225bfb6..c79853685d09ba1d7eaef604395c40b731ed2f34:/src/msw/fontutil.cpp diff --git a/src/msw/fontutil.cpp b/src/msw/fontutil.cpp index 10e1d82f7e..ecaeb8e2bc 100644 --- a/src/msw/fontutil.cpp +++ b/src/msw/fontutil.cpp @@ -143,6 +143,10 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, case wxFONTENCODING_CP1257: info->charset = BALTIC_CHARSET; break; + + case wxFONTENCODING_CP874: + info->charset = THAI_CHARSET; + break; #endif // !Win16 case wxFONTENCODING_CP437: @@ -164,7 +168,7 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info) wxZeroMemory(lf); // all default values lf.lfCharSet = info.charset; - strncpy(lf.lfFaceName, info.facename, sizeof(lf.lfFaceName)); + wxStrncpy(lf.lfFaceName, info.facename, sizeof(lf.lfFaceName)); HFONT hfont = ::CreateFontIndirect(&lf); if ( !hfont ) @@ -397,6 +401,7 @@ wxFont wxCreateFontFromLogFont(const LOGFONT *logFont) fontEncoding = wxFONTENCODING_CP1252; break; +#ifdef __WIN32__ case EASTEUROPE_CHARSET: fontEncoding = wxFONTENCODING_CP1250; break; @@ -425,6 +430,11 @@ wxFont wxCreateFontFromLogFont(const LOGFONT *logFont) fontEncoding = wxFONTENCODING_CP1254; break; + case THAI_CHARSET: + fontEncoding = wxFONTENCODING_CP437; + break; +#endif + case OEM_CHARSET: fontEncoding = wxFONTENCODING_CP437; break;