octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Usage of "{}" as default fontname for gnuplot


From: Benjamin Lindner
Subject: Re: Usage of "{}" as default fontname for gnuplot
Date: Wed, 16 Feb 2011 17:42:15 +0100

> Hello,
>
> currently, for the gnuplot graphics backend, the default font "*" is
> translated into "{}" before passing to gnuplot.
> This causes troubles with the windows terminal, and I wondered if "{}"
> is a valid gnuplot fontname specification.
> I glanced through gnuplot's manual, but there is no mentioning of "{}"
> for a font name - for enhanced text, yes, but not fontname.
> So, shouldn't it be rather "" (empty) for the default fontname?

Sorry clicked send too soon, forgot the details - there's the
offending translation:

diff --git a/scripts/plot/__go_draw_axes__.m b/scripts/plot/__go_draw_axes__.m
--- a/scripts/plot/__go_draw_axes__.m
+++ b/scripts/plot/__go_draw_axes__.m
@@ -2084,7 +2084,7 @@

 function [f, s, fnt, it, bld] = get_fontname_and_size (t)
   if (isempty (t.fontname) || strcmp (t.fontname, "*"))
-    fnt = "{}";
+    fnt = "";
   else
     fnt = t.fontname;
   endif

The manifestation is, that enhanced ylabel text is printed wrong, e.g.
ylabel("foo in mm^2")
results in the superscipt "2" being not rotated but horizontal.

The problem can be reproduced within gnuplot by
  set term windows enhanced
  set ylabel "foo in mm^2" font "{},10"
  plot sin(x)
which fails, but
  set ylabel "foo in mm^2" font ",10"
works as expected


reply via email to

[Prev in Thread] Current Thread [Next in Thread]