X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e528b997e87057723d1b823dd86e3f69ebb672b..06298235850b7e576ef77a9a95b521534f18a4d9:/src/msw/fontutil.cpp diff --git a/src/msw/fontutil.cpp b/src/msw/fontutil.cpp index 87acd82949..f75d090505 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: @@ -154,6 +158,8 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, return FALSE; } + info->encoding = encoding; + return TRUE; } @@ -164,7 +170,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 ) @@ -425,6 +431,10 @@ wxFont wxCreateFontFromLogFont(const LOGFONT *logFont) case TURKISH_CHARSET: fontEncoding = wxFONTENCODING_CP1254; break; + + case THAI_CHARSET: + fontEncoding = wxFONTENCODING_CP437; + break; #endif case OEM_CHARSET: