#include "wx/fontutil.h" // for wxNativeEncodingInfo
class WXDLLEXPORT wxConfigBase;
+class WXDLLEXPORT wxWindow;
// ----------------------------------------------------------------------------
// wxFontMapper manages user-definable correspondence between logical font
#define _WX_UNIX_FONTUTIL_H_
#ifdef __X__
+ struct XFontStruct;
typedef XFontStruct *wxNativeFont;
#elif defined(__WXGTK__)
typedef GdkFont *wxNativeFont;
#pragma implementation "font.h"
#endif
+#include <Xm/Xm.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)
// 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
{
public:
wxXFont();
#include "wx/string.h"
#include "wx/utils.h"
+#include "wx/fontmap.h"
#include "wx/fontenum.h"
#include "wx/fontutil.h"
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,
#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"
XFreeFont((Display *)wxGetDisplay(), font);
}
#elif defined(__WXGTK__)
- #include "gdk/gdk.h"
-
static inline wxNativeFont wxLoadFont(const wxString& fontSpec)
{
return gdk_font_load( wxConvertWX2MB(fontSpec) );