Add wxUSE_PRIVATE_FONTS and drop wxHAS_PRIVATE_FONTS
Handle this feature as all the other ones and provide a configure switch and a setup.h option to disable it if necessary, as it may be desirable to do it, especially under Linux, to avoid extra dependency on pangoft2 if this functionality is unnecessary.
This commit is contained in:
@@ -794,14 +794,14 @@
|
||||
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
|
||||
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
|
||||
#ifdef _MSC_VER
|
||||
# define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#else
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
# define wxUSE_GRAPHICS_CONTEXT 0
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
#define wxUSE_GRAPHICS_CONTEXT 0
|
||||
#endif
|
||||
|
||||
// Enable wxGraphicsContext implementation using Cairo library.
|
||||
@@ -1141,6 +1141,16 @@
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it)
|
||||
#define wxUSE_PREFERENCES_EDITOR 1
|
||||
|
||||
// wxFont::AddPrivateFont() allows to use fonts not installed on the system by
|
||||
// loading them from font files during run-time.
|
||||
//
|
||||
// Default is 1 except under Unix where it will be turned off by configure if
|
||||
// the required libraries are not available or not new enough.
|
||||
//
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it and
|
||||
// want to avoid extra dependencies under Linux, for example).
|
||||
#define wxUSE_PRIVATE_FONTS 1
|
||||
|
||||
// wxRichToolTip is a customizable tooltip class which has more functionality
|
||||
// than the stock (but native, unlike this class) wxToolTip.
|
||||
//
|
||||
|
@@ -983,6 +983,14 @@
|
||||
# endif
|
||||
#endif /* !defined(wxUSE_PREFERENCES_EDITOR) */
|
||||
|
||||
#ifndef wxUSE_PRIVATE_FONTS
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_PRIVATE_FONTS must be defined, please read comment near the top of this file."
|
||||
# else
|
||||
# define wxUSE_PRIVATE_FONTS 0
|
||||
# endif
|
||||
#endif /* !defined(wxUSE_PRIVATE_FONTS) */
|
||||
|
||||
#ifndef wxUSE_PRINTING_ARCHITECTURE
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_PRINTING_ARCHITECTURE must be defined, please read comment near the top of this file."
|
||||
@@ -2305,6 +2313,13 @@
|
||||
# endif
|
||||
#endif /* wxUSE_PREFERENCES_EDITOR */
|
||||
|
||||
#if wxUSE_PRIVATE_FONTS
|
||||
# if !defined(__WXMSW__) && !defined(__WXGTK__) && !defined(__WXOSX__)
|
||||
# undef wxUSE_PRIVATE_FONTS
|
||||
# define wxUSE_PRIVATE_FONTS 0
|
||||
# endif
|
||||
#endif /* wxUSE_PRIVATE_FONTS */
|
||||
|
||||
#if wxUSE_MEDIACTRL
|
||||
# if !wxUSE_LONGLONG
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
|
@@ -329,11 +329,10 @@ public:
|
||||
static wxFont *New(const wxString& strNativeFontDesc);
|
||||
|
||||
// Load the font from the given file and return true on success or false on
|
||||
// error (an error message will be logged in this case, unless there is no
|
||||
// support for private fonts at all in the current port, in which case
|
||||
// wxHAS_PRIVATE_FONTS will not be defined allowing to check for this at
|
||||
// compile-time).
|
||||
// error (an error message will be logged in this case).
|
||||
#if wxUSE_PRIVATE_FONTS
|
||||
static bool AddPrivateFont(const wxString& filename);
|
||||
#endif // wxUSE_PRIVATE_FONTS
|
||||
|
||||
// comparison
|
||||
bool operator==(const wxFont& font) const;
|
||||
|
@@ -118,8 +118,4 @@ private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxFont);
|
||||
};
|
||||
|
||||
#ifdef wxHAVE_FONTCONFIG_2_8_0
|
||||
#define wxHAS_PRIVATE_FONTS 1
|
||||
#endif
|
||||
|
||||
#endif // _WX_GTK_FONT_H_
|
||||
|
@@ -795,14 +795,14 @@
|
||||
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
|
||||
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
|
||||
#ifdef _MSC_VER
|
||||
# define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#else
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
# define wxUSE_GRAPHICS_CONTEXT 0
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
#define wxUSE_GRAPHICS_CONTEXT 0
|
||||
#endif
|
||||
|
||||
// Enable wxGraphicsContext implementation using Cairo library.
|
||||
@@ -1142,6 +1142,16 @@
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it)
|
||||
#define wxUSE_PREFERENCES_EDITOR 1
|
||||
|
||||
// wxFont::AddPrivateFont() allows to use fonts not installed on the system by
|
||||
// loading them from font files during run-time.
|
||||
//
|
||||
// Default is 1 except under Unix where it will be turned off by configure if
|
||||
// the required libraries are not available or not new enough.
|
||||
//
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it and
|
||||
// want to avoid extra dependencies under Linux, for example).
|
||||
#define wxUSE_PRIVATE_FONTS 1
|
||||
|
||||
// wxRichToolTip is a customizable tooltip class which has more functionality
|
||||
// than the stock (but native, unlike this class) wxToolTip.
|
||||
//
|
||||
|
@@ -795,14 +795,14 @@
|
||||
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
|
||||
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
|
||||
#ifdef _MSC_VER
|
||||
# define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#else
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
# define wxUSE_GRAPHICS_CONTEXT 0
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
#define wxUSE_GRAPHICS_CONTEXT 0
|
||||
#endif
|
||||
|
||||
// Enable wxGraphicsContext implementation using Cairo library.
|
||||
@@ -1142,6 +1142,16 @@
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it)
|
||||
#define wxUSE_PREFERENCES_EDITOR 1
|
||||
|
||||
// wxFont::AddPrivateFont() allows to use fonts not installed on the system by
|
||||
// loading them from font files during run-time.
|
||||
//
|
||||
// Default is 1 except under Unix where it will be turned off by configure if
|
||||
// the required libraries are not available or not new enough.
|
||||
//
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it and
|
||||
// want to avoid extra dependencies under Linux, for example).
|
||||
#define wxUSE_PRIVATE_FONTS 1
|
||||
|
||||
// wxRichToolTip is a customizable tooltip class which has more functionality
|
||||
// than the stock (but native, unlike this class) wxToolTip.
|
||||
//
|
||||
|
@@ -169,6 +169,4 @@ private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxFont);
|
||||
};
|
||||
|
||||
#define wxHAS_PRIVATE_FONTS 1
|
||||
|
||||
#endif // _WX_FONT_H_
|
||||
|
@@ -795,14 +795,14 @@
|
||||
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
|
||||
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
|
||||
#ifdef _MSC_VER
|
||||
# define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#else
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
# define wxUSE_GRAPHICS_CONTEXT 0
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
#define wxUSE_GRAPHICS_CONTEXT 0
|
||||
#endif
|
||||
|
||||
// Enable wxGraphicsContext implementation using Cairo library.
|
||||
@@ -1142,6 +1142,16 @@
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it)
|
||||
#define wxUSE_PREFERENCES_EDITOR 1
|
||||
|
||||
// wxFont::AddPrivateFont() allows to use fonts not installed on the system by
|
||||
// loading them from font files during run-time.
|
||||
//
|
||||
// Default is 1 except under Unix where it will be turned off by configure if
|
||||
// the required libraries are not available or not new enough.
|
||||
//
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it and
|
||||
// want to avoid extra dependencies under Linux, for example).
|
||||
#define wxUSE_PRIVATE_FONTS 1
|
||||
|
||||
// wxRichToolTip is a customizable tooltip class which has more functionality
|
||||
// than the stock (but native, unlike this class) wxToolTip.
|
||||
//
|
||||
|
@@ -167,6 +167,4 @@ private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxFont);
|
||||
};
|
||||
|
||||
#define wxHAS_PRIVATE_FONTS 1
|
||||
|
||||
#endif // _WX_FONT_H_
|
||||
|
@@ -1148,6 +1148,16 @@
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it)
|
||||
#define wxUSE_PREFERENCES_EDITOR 1
|
||||
|
||||
// wxFont::AddPrivateFont() allows to use fonts not installed on the system by
|
||||
// loading them from font files during run-time.
|
||||
//
|
||||
// Default is 1 except under Unix where it will be turned off by configure if
|
||||
// the required libraries are not available or not new enough.
|
||||
//
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it and
|
||||
// want to avoid extra dependencies under Linux, for example).
|
||||
#define wxUSE_PRIVATE_FONTS 1
|
||||
|
||||
// wxRichToolTip is a customizable tooltip class which has more functionality
|
||||
// than the stock (but native, unlike this class) wxToolTip.
|
||||
//
|
||||
|
@@ -1138,6 +1138,16 @@
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it)
|
||||
#define wxUSE_PREFERENCES_EDITOR 1
|
||||
|
||||
// wxFont::AddPrivateFont() allows to use fonts not installed on the system by
|
||||
// loading them from font files during run-time.
|
||||
//
|
||||
// Default is 1 except under Unix where it will be turned off by configure if
|
||||
// the required libraries are not available or not new enough.
|
||||
//
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it and
|
||||
// want to avoid extra dependencies under Linux, for example).
|
||||
#define wxUSE_PRIVATE_FONTS 1
|
||||
|
||||
// wxRichToolTip is a customizable tooltip class which has more functionality
|
||||
// than the stock (but native, unlike this class) wxToolTip.
|
||||
//
|
||||
|
@@ -794,14 +794,14 @@
|
||||
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
|
||||
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
|
||||
#ifdef _MSC_VER
|
||||
# define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#define wxUSE_GRAPHICS_CONTEXT 1
|
||||
#else
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
# define wxUSE_GRAPHICS_CONTEXT 0
|
||||
// Disable support for other Windows compilers, enable it if your compiler
|
||||
// comes with new enough SDK or you installed the headers manually.
|
||||
//
|
||||
// Notice that this will be set by configure under non-Windows platforms
|
||||
// anyhow so the value there is not important.
|
||||
#define wxUSE_GRAPHICS_CONTEXT 0
|
||||
#endif
|
||||
|
||||
// Enable wxGraphicsContext implementation using Cairo library.
|
||||
@@ -1141,6 +1141,16 @@
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it)
|
||||
#define wxUSE_PREFERENCES_EDITOR 1
|
||||
|
||||
// wxFont::AddPrivateFont() allows to use fonts not installed on the system by
|
||||
// loading them from font files during run-time.
|
||||
//
|
||||
// Default is 1 except under Unix where it will be turned off by configure if
|
||||
// the required libraries are not available or not new enough.
|
||||
//
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it and
|
||||
// want to avoid extra dependencies under Linux, for example).
|
||||
#define wxUSE_PRIVATE_FONTS 1
|
||||
|
||||
// wxRichToolTip is a customizable tooltip class which has more functionality
|
||||
// than the stock (but native, unlike this class) wxToolTip.
|
||||
//
|
||||
|
Reference in New Issue
Block a user