|
From: Benjamin L. <bj...@gm...> - 2011-02-10 12:18:12
|
> Am I right? Correct. I got myself a CVS 2011-01-25 snapshot from https://github.com/gnuplot/gnuplot and tested against it, and it works for me (i.e. solves the problem). So I'd like to propose the following patch to fix the ylabel-not-rotated problem. diff --git a/src/win/wgraph.c b/src/win/wgraph.c --- a/src/win/wgraph.c +++ b/src/win/wgraph.c @@ -2613,9 +2613,10 @@ { int newfontsize; bool remakefonts = FALSE; + bool font_is_not_empty = (font != NULL) && (font[0] != '\0'); newfontsize = (fontsize != 0) ? fontsize : lpgw->deffontsize; - if (font != NULL) { + if (font_is_not_empty) { remakefonts = (strcmp(lpgw->fontname, font) != 0) || (newfontsize != lpgw->fontsize); } else { remakefonts = (strcmp(lpgw->fontname, lpgw->deffontname) != 0) || (newfontsize != lpgw->fontsize); @@ -2623,7 +2624,7 @@ if (remakefonts) { lpgw->fontsize = newfontsize; - strcpy(lpgw->fontname, (font) ? font : lpgw->deffontname); + strcpy(lpgw->fontname, font_is_not_empty ? font : lpgw->deffontname); DestroyFonts(lpgw); MakeFonts(lpgw, &rect, hdc); diff --git a/term/win.trm b/term/win.trm --- a/term/win.trm +++ b/term/win.trm @@ -730,7 +730,6 @@ int fontsize; if (font == NULL) { - GraphOp(&graphwin, W_font, 0, 0, ""); strcpy(WIN_font, graphwin.deffontname); WIN_fontsize = graphwin.deffontsize; return TRUE; The problem of the enhanced text positioning is fixed with the patch suggested at http://article.gmane.org/gmane.comp.graphics.gnuplot.devel/9905 which still applies for the 2011-01-25 CVS snapshot. benjamin |