]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/fontutil.cpp
don't use MSW-only DEFAULT_ITEM_WIDTH but the width returned by the best class GetBes...
[wxWidgets.git] / src / os2 / fontutil.cpp
index e6d9b45d7f2c9fc296a41228f5e4eecddd0dde08..8883b7305cdcf25a227b4f9b44273a381a73b1be 100644 (file)
@@ -233,7 +233,7 @@ bool wxTestFontEncoding( const wxNativeEncodingInfo& rInfo )
     vLogFont.fsFontUse = FATTR_FONTUSE_OUTLINE |      // only outline fonts allowed
                          FATTR_FONTUSE_TRANSFORMABLE; // may be transformed
 
-    wxStrncpy((wxChar*)vLogFont.szFacename, rInfo.facename.c_str(), WXSIZEOF(vLogFont.szFacename));
+    wxStrlcpy((wxChar*)vLogFont.szFacename, rInfo.facename.c_str(), WXSIZEOF(vLogFont.szFacename));
 
     if (!::GpiCreateLogFont( hPS
                             ,NULL
@@ -549,7 +549,7 @@ void wxOS2SelectMatchingFontByName(
             break;
     }
 
-    wxStrncpy(zFontFaceName, sFaceName.c_str(), WXSIZEOF(zFontFaceName));
+    wxStrlcpy(zFontFaceName, sFaceName.c_str(), WXSIZEOF(zFontFaceName));
     nPointSize = pFont->GetPointSize();
 
     //