]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/fontutil.cpp
SN: Added #pragma implementation needed by GCC - expect more to come
[wxWidgets.git] / src / msw / fontutil.cpp
index 10e1d82f7e0f7444656deefc3c817f5e46d82054..f75d090505e6b308b19f904cbf5cb90b11a1b281 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:
@@ -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 )
@@ -397,6 +403,7 @@ wxFont wxCreateFontFromLogFont(const LOGFONT *logFont)
             fontEncoding = wxFONTENCODING_CP1252;
             break;
 
+#ifdef __WIN32__
         case EASTEUROPE_CHARSET:
             fontEncoding = wxFONTENCODING_CP1250;
             break;
@@ -425,6 +432,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;