Add support for loading fonts from files.

wxFont::AddPrivateFont() can now be used to load a font from a file for the
applications private use. Update the font sample to show this.

Closes #13568.
This commit is contained in:
Arthur Norman
2017-11-07 17:41:11 +01:00
committed by Vadim Zeitlin
parent 760bd1bf4e
commit 547e40b114
19 changed files with 366 additions and 8 deletions

View File

@@ -328,6 +328,12 @@ public:
// from the string representation of wxNativeFontInfo
static wxFont *New(const wxString& strNativeFontDesc);
// These functions can be used to load private fonts if supported by this
// platform (wxHAS_PRIVATE_FONTS is defined): first add one or more files
// and then activate all of them at once.
static bool AddPrivateFont(const wxString& filename);
static bool ActivatePrivateFonts();
// comparison
bool operator==(const wxFont& font) const;
bool operator!=(const wxFont& font) const { return !(*this == font); }