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:
committed by
Vadim Zeitlin
parent
760bd1bf4e
commit
547e40b114
@@ -109,6 +109,7 @@ All (GUI):
|
||||
|
||||
- Allow wxWebView::RunScript() return values (Jose Lorenzo, GSoC 2017).
|
||||
- Allow using fractional pen widths with wxGraphicsContext (Adrien Tétar).
|
||||
- Add support for loading fonts from external files (Arthur Norman).
|
||||
- Improve wxSVGFileDC to support more of wxDC API (Maarten Bent).
|
||||
- Add support for wxAuiManager and wxAuiPaneInfo to XRC (Andrea Zanellato).
|
||||
- Add support for wxSL_MIN_MAX_LABELS and wxSL_VALUE_LABEL to XRC (ousnius).
|
||||
|
@@ -188,6 +188,7 @@ Currently the following symbols exist:
|
||||
@itemdef{wxHAS_IMAGES_IN_RESOURCES, Defined if <a href="http://en.wikipedia.org/wiki/Resource_(Windows)">
|
||||
Windows resource files</a> or OS/2 resource files are available on the current platform.}
|
||||
@itemdef{wxHAS_POWER_EVENTS, Defined if wxPowerEvent are ever generated on the current platform.}
|
||||
@itemdef{wxHAS_PRIVATE_FONTS, Defined if wxFont::AddPrivateFont() is implemented.}
|
||||
@itemdef{wxHAS_RADIO_MENU_ITEMS,
|
||||
Defined if the current port supports radio menu items (see wxMenu::AppendRadioItem).}
|
||||
@itemdef{wxHAS_RAW_BITMAP, Defined if direct access to bitmap data using the classes in @c wx/rawbmp.h is supported.}
|
||||
|
@@ -75,4 +75,19 @@ implemented for Windows and Unix (GTK+ and Motif) ports only, all the methods
|
||||
are available for all the ports and should be used to make your program work
|
||||
correctly when they are implemented later.
|
||||
|
||||
@section overview_font_privateinfo Private font information
|
||||
|
||||
Sometimes an application needs fonts that are not globally installed on the
|
||||
system. On Macintosh/OSX this can be arranged by placing the desired fonts
|
||||
within the Application Bundle in Contents/Resources/Fonts and using
|
||||
the ATSApplicationFontsPath key to point there. The full details of the
|
||||
procedure there can be found as OSX developer resources. For the GTK+ and
|
||||
Windows ports it is possible to add TrueType fonts at run-time using
|
||||
a sequence of calls to wxFont::AddPrivateFont() to give the names of files
|
||||
containing font data, followed by a call to wxFont::ActivatePrivateFonts()
|
||||
to complete the process of making the fonts available. These functions
|
||||
return false if they fail. They should be called just once before any
|
||||
graphics contexts have been created or other activity liable to use fonts
|
||||
has happened.
|
||||
|
||||
*/
|
||||
|
Reference in New Issue
Block a user