changeset 7372:c51426c80045

[project @ 2008-01-14 19:50:10 by jwe]
author jwe
date Mon, 14 Jan 2008 19:50:10 +0000
parents fe9a44d753d6
children f350da755600
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Jan 14 19:34:22 2008 +0000
+++ b/scripts/ChangeLog	Mon Jan 14 19:50:10 2008 +0000
@@ -1,5 +1,10 @@
 2008-01-14  John W. Eaton  <jwe@octave.org>
 
+	* plot/__go_draw_axes__.m (get_fontname_and_size): Use strcmpi
+	instead of calling tolower on first arg.  Default font name is
+	Helvetica, not helvetica.  Don't downcase user-specified font name.
+	(__maybe_munge_text__): Fix typo.
+
 	* optimization/sqp.m: Fix function definitions in test code.
 
 2008-01-12  John W. Eaton  <jwe@octave.org>
--- a/scripts/plot/__go_draw_axes__.m	Mon Jan 14 19:34:22 2008 +0000
+++ b/scripts/plot/__go_draw_axes__.m	Mon Jan 14 19:50:10 2008 +0000
@@ -1602,17 +1602,17 @@
 
 function [f, s, fnt, it, bld] = get_fontname_and_size (t)
   if (isempty (t.fontname))
-    fnt = "helvetica";
+    fnt = "Helvetica";
   else
-    fnt = tolower (t.fontname);
+    fnt = t.fontname;
   endif
   f = fnt;
   it = false;
   bld = false;
-  if (! isempty (t.fontweight) && strcmp (tolower (t.fontweight), "bold"))
+  if (! isempty (t.fontweight) && strcmpi (t.fontweight, "bold"))
     if (! isempty(t.fontangle)
-	&& (strcmp (tolower (t.fontangle), "italic")
-	    || strcmp (tolower (t.fontangle), "oblique")))
+	&& (strcmpi (t.fontangle, "italic")
+	    || strcmpi (t.fontangle, "oblique")))
       f = strcat (f, "-bolditalic");
       it = true;
       bld = true;
@@ -1621,8 +1621,8 @@
       bld = true;
     endif
   elseif (! isempty(t.fontangle)
-	  && (strcmp (tolower (t.fontangle), "italic")
-	      || strcmp (tolower (t.fontangle), "oblique")))
+	  && (strcmpi (t.fontangle, "italic")
+	      || strcmpi (t.fontangle, "oblique")))
     f = strcat (f, "-italic");
     it = true;
   endif
@@ -1640,7 +1640,7 @@
   if (strcmp (fld, "string"))
     [f, s, fnt, it, bld] = get_fontname_and_size (obj);
   else
-    f = "Helvectica";
+    f = "Helvetica";
     s = 10;
     fnt = f;
     it = false;