git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4378
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/fontutil.h" // for wxNativeEncodingInfo
class WXDLLEXPORT wxConfigBase;
#include "wx/fontutil.h" // for wxNativeEncodingInfo
class WXDLLEXPORT wxConfigBase;
+class WXDLLEXPORT wxWindow;
// ----------------------------------------------------------------------------
// wxFontMapper manages user-definable correspondence between logical font
// ----------------------------------------------------------------------------
// wxFontMapper manages user-definable correspondence between logical font
#define _WX_UNIX_FONTUTIL_H_
#ifdef __X__
#define _WX_UNIX_FONTUTIL_H_
#ifdef __X__
typedef XFontStruct *wxNativeFont;
#elif defined(__WXGTK__)
typedef GdkFont *wxNativeFont;
typedef XFontStruct *wxNativeFont;
#elif defined(__WXGTK__)
typedef GdkFont *wxNativeFont;
#pragma implementation "font.h"
#endif
#pragma implementation "font.h"
#endif
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/font.h"
#include "wx/gdicmn.h"
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/font.h"
#include "wx/gdicmn.h"
-#include "wx/utils.h"
-
-#include <Xm/Xm.h>
+#include "wx/utils.h" // for wxGetDisplay()
+#include "wx/fontutil.h"
#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
// For every wxFont, there must be a font for each display and scale requested.
// So these objects are stored in wxFontRefData::m_fonts
// For every wxFont, there must be a font for each display and scale requested.
// So these objects are stored in wxFontRefData::m_fonts
-class wxXFont: public wxObject
+class wxXFont : public wxObject
#include "wx/string.h"
#include "wx/utils.h"
#include "wx/string.h"
#include "wx/utils.h"
#include "wx/fontenum.h"
#include "wx/fontutil.h"
#include "wx/fontenum.h"
#include "wx/fontutil.h"
wxNativeEncodingInfo info;
wxGetNativeFontEncoding(encoding, &info);
wxNativeEncodingInfo info;
wxGetNativeFontEncoding(encoding, &info);
+ if ( !wxTestFontEncoding(info) )
+ {
+ // ask font mapper for a replacement
+ (void)wxTheFontMapper->GetAltForEncoding(encoding, &info);
+ }
+
wxString pattern;
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
spacing,
wxString pattern;
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
spacing,
#ifndef WX_PRECOMP
#endif // PCH
#ifndef WX_PRECOMP
#endif // PCH
+#ifdef __X__
+ #include <X11/Xlib.h>
+
+ #include "wx/utils.h" // for wxGetDisplay()
+#elif defined(__WXGTK__)
+ #include "gdk/gdk.h"
+#endif
+
#include "wx/fontutil.h"
#include "wx/fontmap.h"
#include "wx/tokenzr.h"
#include "wx/fontutil.h"
#include "wx/fontmap.h"
#include "wx/tokenzr.h"
XFreeFont((Display *)wxGetDisplay(), font);
}
#elif defined(__WXGTK__)
XFreeFont((Display *)wxGetDisplay(), font);
}
#elif defined(__WXGTK__)
static inline wxNativeFont wxLoadFont(const wxString& fontSpec)
{
return gdk_font_load( wxConvertWX2MB(fontSpec) );
static inline wxNativeFont wxLoadFont(const wxString& fontSpec)
{
return gdk_font_load( wxConvertWX2MB(fontSpec) );