#ifndef WX_PRECOMP
#include "wx/font.h" // wxFont enums
#include "wx/encinfo.h"
+ #include "wx/hash.h"
+ #include "wx/utils.h" // for wxGetDisplay()
#endif // PCH
#include "wx/fontutil.h"
#include "wx/fontmap.h"
#include "wx/tokenzr.h"
-#include "wx/hash.h"
#include "wx/module.h"
#if wxUSE_PANGO
void wxNativeFontInfo::SetFaceName(const wxString& facename)
{
- pango_font_description_set_family( description, wxGTK_CONV(facename) );
+ pango_font_description_set_family(description, wxGTK_CONV_SYS(facename));
}
void wxNativeFontInfo::SetFamily(wxFontFamily WXUNUSED(family))
if (description)
pango_font_description_free( description );
- description = pango_font_description_from_string( wxGTK_CONV( s ) );
+ description = pango_font_description_from_string( wxGTK_CONV_SYS( s ) );
return true;
}
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
wxNativeEncodingInfo *info)
{
+ // all encodings are available in GTK+ 2 because we translate text in any
+ // encoding to UTF-8 internally anyhow
info->facename.clear();
+ info->encoding = encoding;
- switch ( encoding )
- {
- // we *must* return true for default encodings as otherwise wxFontMapper
- // considers that we can't load any font and aborts with wxLogFatalError!
- case wxFONTENCODING_DEFAULT:
- case wxFONTENCODING_SYSTEM:
- info->encoding = wxFONTENCODING_SYSTEM;
- return true;
-
- case wxFONTENCODING_UTF8:
- info->encoding = wxFONTENCODING_UTF8;
- return true;
-
- default:
- // everything else must be converted to UTF-8
- return false;
- }
+ return true;
}
#else // GTK+ 1.x
#pragma message enable nosimpint
#endif
- #include "wx/utils.h" // for wxGetDisplay()
#elif defined(__WXGTK__)
// we have to declare struct tm to avoid problems with first forward
// declaring it in C code (glib.h included from gdk.h does it) and then