// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////////
+#define DEBUG_PRINTF(NAME) { static int raz=0; \
+ printf( #NAME " %i\n",raz); fflush(stdout); \
+ raz++; \
+ }
// ============================================================================
// declarations
// headers
// ----------------------------------------------------------------------------
+#ifdef __GNUG__
+ #pragma implementation "fontutil.h"
+#endif
+
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// ----------------------------------------------------------------------------
// convert to/from the string representation: format is
-// facename[;charset]
+// encodingid;facename[;charset]
bool wxNativeEncodingInfo::FromString(const wxString& s)
{
wxStringTokenizer tokenizer(s, _T(";"));
+ wxString encid = tokenizer.GetNextToken();
+ long enc;
+ if ( !encid.ToLong(&enc) )
+ return FALSE;
+ encoding = (wxFontEncoding)enc;
+
facename = tokenizer.GetNextToken();
if ( !facename )
return FALSE;
wxString wxNativeEncodingInfo::ToString() const
{
- wxString s(facename);
+ wxString s;
+
+ s << (long)encoding << _T(';') << facename;
+
// TODO: what is this for OS/2?
/*
if ( charset != ANSI_CHARSET )
wxFont wxCreateFontFromLogFont(const LOGFONT *logFont)
{
+DEBUG_PRINTF(wxCreateFontFromLogFont)
+
// extract family from pitch-and-family
int lfFamily = logFont->lfPitchAndFamily;
if ( lfFamily & FIXED_PITCH )