changeset 8944:cb0e9facc342

make default fontname * instead of Helvetica
author John W. Eaton <jwe@octave.org>
date Mon, 09 Mar 2009 17:12:18 -0400
parents 4a312440b262
children 45f8197ffd51
files src/ChangeLog src/graphics.cc src/graphics.h.in
diffstat 3 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Mar 09 17:07:43 2009 -0400
+++ b/src/ChangeLog	Mon Mar 09 17:12:18 2009 -0400
@@ -8,6 +8,12 @@
 	* data.cc (F__accumarray_sum__): New function.
 	(do_accumarray_sum): New helper template function.
 
+2009-03-07  John W. Eaton  <jwe@octave.org>
+
+	* graphics.h.in (OCTAVE_DEFAULT_FONTNAME): New macro, defaults to "*".
+	(axes::properties, text::properties): Use it to set default fontname.
+	* graphics.cc (axes::properties::set_defaults): Likewise.
+
 2009-03-07  Jaroslav Hajek  <highegg@gmail.com>
 
 	* xdiv.cc (mdm_div_impl, dmm_lelftdiv_impl, dmdm_div_impl,
--- a/src/graphics.cc	Mon Mar 09 17:07:43 2009 -0400
+++ b/src/graphics.cc	Mon Mar 09 17:12:18 2009 -0400
@@ -2536,7 +2536,7 @@
   if (mode != "replace")
     {
       fontangle = "normal";
-      fontname = "Helvetica";
+      fontname = OCTAVE_DEFAULT_FONTNAME;
       fontsize = 12;
       fontunits = "points";
       fontweight = "normal";
--- a/src/graphics.h.in	Mon Mar 09 17:07:43 2009 -0400
+++ b/src/graphics.h.in	Mon Mar 09 17:12:18 2009 -0400
@@ -40,6 +40,13 @@
 #include "oct-mutex.h"
 #include "ov.h"
 
+// FIXME -- maybe this should be a configure option?
+// Matlab defaults to "Helvetica", but that causes problems for many
+// gnuplot users.
+#if !defined (OCTAVE_DEFAULT_FONTNAME)
+#define OCTAVE_DEFAULT_FONTNAME "*"
+#endif
+
 class caseless_str : public std::string
 {
 public:
@@ -2686,7 +2693,7 @@
       array_property currentpoint , Matrix (2, 3, 0.0)
       radio_property drawmode , "{normal}|fast"
       radio_property fontangle , "{normal}|italic|oblique"
-      string_property fontname , "Helvetica"
+      string_property fontname , OCTAVE_DEFAULT_FONTNAME
       double_property fontsize , 12
       radio_property fontunits , "{points}|normalized|inches|centimeters|pixels"
       radio_property fontweight , "{normal}|light|demi|bold"
@@ -2966,7 +2973,7 @@
       double_property rotation , 0
       radio_property horizontalalignment , "{left}|center|right"
       color_property color , color_values (0, 0, 0)
-      string_property fontname , "Helvetica"
+      string_property fontname , OCTAVE_DEFAULT_FONTNAME
       double_property fontsize , 10
       radio_property fontangle , "{normal}|italic|oblique"
       radio_property fontweight , "light|{normal}|demi|bold"