[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: Font fix

Kaffe CVS cvs-commits at kaffe.org
Wed Mar 9 04:21:07 PST 2005


PatchSet 5509 
Date: 2005/03/09 12:14:40
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: Font fix

2005-03-09  Dalibor Topic  <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2005-03-08 David Gilbert <david.gilbert at object-refinery.com>

        * java/awt/Font.java (decode): Handle null argument and allow
        space as delimiter.

Members: 
	ChangeLog:1.3683->1.3684 
	libraries/javalib/java/awt/Font.java:1.24->1.25 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3683 kaffe/ChangeLog:1.3684
--- kaffe/ChangeLog:1.3683	Wed Mar  9 12:10:13 2005
+++ kaffe/ChangeLog	Wed Mar  9 12:14:40 2005
@@ -2,6 +2,15 @@
 
 	Resynced with GNU Classpath.
 
+	2005-03-08 David Gilbert <david.gilbert at object-refinery.com>
+
+        * java/awt/Font.java (decode): Handle null argument and allow
+        space as delimiter.
+
+2005-03-09  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
 	2005-03-07  Chris Burdess  <dog at gnu.org>
 
         * gnu/java/net/protocol/https/Handler.java: New file.
Index: kaffe/libraries/javalib/java/awt/Font.java
diff -u kaffe/libraries/javalib/java/awt/Font.java:1.24 kaffe/libraries/javalib/java/awt/Font.java:1.25
--- kaffe/libraries/javalib/java/awt/Font.java:1.24	Wed Feb 23 19:09:24 2005
+++ kaffe/libraries/javalib/java/awt/Font.java	Wed Mar  9 12:14:44 2005
@@ -209,14 +209,21 @@
   * The style should be one of BOLD, ITALIC, or BOLDITALIC.  The default
   * style if none is specified is PLAIN.  The default size if none
   * is specified is 12.
+  * 
+  * @param fontspec  a string specifying the required font (<code>null</code> 
+  *                  permitted, interpreted as 'Dialog-PLAIN-12').
+  * 
+  * @return A font.
   */
   public static Font decode (String fontspec)
 {
+  if (fontspec == null) 
+    fontspec = "Dialog-PLAIN-12";
   String name = null;
   int style = PLAIN;
   int size = 12;
 
-  StringTokenizer st = new StringTokenizer(fontspec, "-");
+  StringTokenizer st = new StringTokenizer(fontspec, "- ");
   while (st.hasMoreTokens())
     {
       String token = st.nextToken();




More information about the kaffe mailing list