// Created: 05.11.99
// RCS-ID: $Id$
// Copyright: (c) Vadim Zeitlin
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
description = NULL;
}
+void
+wxNativeFontInfo::Init(const wxNativeFontInfo& info)
+{
+ if (info.description)
+ description = pango_font_description_copy(info.description);
+ else
+ description = NULL;
+}
+
+void wxNativeFontInfo::Free()
+{
+ if (description)
+ pango_font_description_free(description);
+}
+
int wxNativeFontInfo::GetPointSize() const
{
return pango_font_description_get_size( description ) / PANGO_SCALE;
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
wxNativeEncodingInfo *info)
{
- return FALSE;
+ // we *must* return true for default encoding as otherwise wxFontMapper
+ // considers that we can't load any font and aborts with wxLogFatalError!
+ if ( encoding == wxFONTENCODING_SYSTEM )
+ {
+ info->facename.clear();
+ info->encoding = wxFONTENCODING_SYSTEM;
+ }
+
+ // pretend that we support everything, it's better than to always return
+ // false as the old code did
+ return true;
}
#else // GTK+ 1.x
break;
case wxFONTENCODING_GB2312:
- info->xregistry = wxT("GB2312"); // or the otherway round?
+ info->xregistry = wxT("GB2312"); // or the otherway round?
info->xencoding = wxT("*");
break;