Skip to content

Commit

Permalink
insure correct detection of FREETYPE and use only FREETYPE in wxwidge…
Browse files Browse the repository at this point in the history
…ts driver code.

insure build directory empty when build_gdl.sh configure is called.
  • Loading branch information
GillesDuvert committed Oct 7, 2024
1 parent 4c012d2 commit f5c9d11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/build_gdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ function configure_gdl {
log "Fatal error! Unknown DEPS: ${DEPS}"
exit 1
fi


rm -r ${ROOT_DIR}/build
mkdir -p ${ROOT_DIR}/build
cd ${ROOT_DIR}/build
rm -f CMakeCache.txt #each 'build' resets cmake, which is safer!
Expand Down
3 changes: 2 additions & 1 deletion src/gdlwxstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ GDLWXStream::GDLWXStream( int width, int height )
spage(0,0, width, height, 0, 0 ); //width and height have importance. dpi is best left to plplot.

//select the fonts in all cases...
std::string what = "hrshsym=0,text=1,smooth=1";
// If wxwidgets have freetype (determined by PL_HAVE_FREETYPE, see src/plplot/modules/freetype, driver will have freetype enabled.
std::string what = "hrshsym=0,text=1"; //no smooth available
setopt("drvopt", what.c_str());

//init the driver...
Expand Down
4 changes: 4 additions & 0 deletions src/plplot/drivers/deprecated_wxwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,11 @@ wxPLDevBase* common_init( PLStream *pls )
PLFLT downscale, downscale2;

// default options
#ifdef PL_HAVE_FREETYPE
static PLINT freetype = 1;
#else
static PLINT freetype = -1;
#endif
static PLINT smooth_text = 1;
static PLINT text = -1;
static PLINT hrshsym = 0;
Expand Down

0 comments on commit f5c9d11

Please sign in to comment.