|
From: Shigeharu T. <sh...@ie...> - 2010-08-09 11:15:33
|
shige 08/09 2010
----------------
Ethan Merritt wrote:
| > In enhanced mode for x11 term, the following commands
| >
| > set ylabel '{/Symbol=20 x}'
| > set xlabel 'sin' font ',14'
| > plot sin(x) notitle
| >
| > put the xlabel of "Symbol" font, but other terminals (post,wxt,
| > svg,emf) put xlabels of default font.
| >
| > This may be fixed by the following patch.
|
| Thank you for the bug report.
| Your test case does indeed reveal a problem.
| Unfortunately, on my computer the patch does not fix it.
| Maybe we need a corresponding change in gplt_x11?
I find that the gnuplot_x11 uses the previous font if the default
font is unknown and the font specification form is ',<size>'. For
example,
set term x11 enh font "Unknown-Fontname"
set ylabel '{/Symbol=20 x}'
set xlabel 'sin' font ',14'
plot x
the problem also remains even if with my last patch.
The following additional patch for src/gplt_x11.c may solve the
problem. But, I don't know well that we should use the default
font instead of previous font for such a case.
----- From here -----
--- src/gplt_x11.c.ORG Mon Aug 9 18:54:02 2010
+++ src/gplt_x11.c Mon Aug 9 20:02:38 2010
@@ -5549,7 +5549,9 @@
pr_font( fontname )
char *fontname;
{
+#if 0
static char previous_font_name[128];
+#endif
char fontspec[128];
int fontsize = 0;
#ifdef USE_X11_MULTIBYTE
@@ -5612,7 +5614,11 @@
#endif
} else if (*fontname == ',') {
sscanf(&fontname[1], "%d", &fontsize);
+#if 0
fontname = previous_font_name;
+#else
+ fontname = default_font;
+#endif
#ifdef USE_X11_MULTIBYTE
backfont = 1;
#endif
@@ -5758,8 +5764,10 @@
if (usemultibyte && orgfontname)
fontname = orgfontname;
#endif
+#if 0
strncpy(previous_font_name, fontname, sizeof(previous_font_name)-1);
FPRINTF((stderr, "gnuplot_x11:saving current font name \"%s\"\n", previous_font_name));
+#endif
}
/* By now we have tried everything we can to honor the specific request. */
----- To here -----
+========================================================+
Shigeharu TAKENO NIigata Institute of Technology
kashiwazaki,Niigata 945-1195 JAPAN
sh...@ie... TEL(&FAX): +81-257-22-8161
+========================================================+
|