]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/fontutil.cpp
Update bug in wxListCtrl,
[wxWidgets.git] / src / msw / fontutil.cpp
index 10e1d82f7e0f7444656deefc3c817f5e46d82054..ecaeb8e2bcb959cb7bf716626cf103c63b724624 100644 (file)
@@ -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;