// Purpose: font-related helper functions for wxMSW
// Author: Vadim Zeitlin
// Modified by:
// Created: 05.11.99
// RCS-ID: $Id$
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Purpose: font-related helper functions for wxMSW
// Author: Vadim Zeitlin
// Modified by:
// Created: 05.11.99
// RCS-ID: $Id$
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
wxNativeEncodingInfo *info)
{
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
wxNativeEncodingInfo *info)
{
extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding);
info->charset = wxEncodingToCharset(encoding);
if ( info->charset == -1 )
extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding);
info->charset = wxEncodingToCharset(encoding);
if ( info->charset == -1 )
- lf.lfCharSet = info.charset;
- wxStrncpy(lf.lfFaceName, info.facename, WXSIZEOF(lf.lfFaceName));
+ lf.lfCharSet = (BYTE)info.charset;
+ wxStrlcpy(lf.lfFaceName, info.facename.c_str(), WXSIZEOF(lf.lfFaceName));