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

@@ -213,7 +213,7 @@ $(OBJS):
### Targets: ###
all: $(OBJS)\font.exe
all: $(OBJS)\font.exe data
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
@@ -231,6 +231,10 @@ $(OBJS)\font.exe: $(FONT_OBJECTS) $(OBJS)\font_sample.res
c0w32.obj $(FONT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\font_sample.res
|
data:
if not exist $(OBJS) mkdir $(OBJS)
for %f in (wxprivate.ttf) do if not exist $(OBJS)\%f copy .\%f $(OBJS)
$(OBJS)\font_sample.res: .\..\..\samples\sample.rc
brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i$(SETUPHDIR) -i.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) -i. $(__DLLFLAG_p_1) -i.\..\..\samples -i$(BCCDIR)\include\windows\sdk -dNOPCH .\..\..\samples\sample.rc