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:
Vadim Zeitlin
2017-11-14 15:24:15 +01:00
parent a98c51e6bc
commit b040dab0ca
25 changed files with 213 additions and 95 deletions

View File

@@ -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;