2002/09/03 18:09:03
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:50:26 +0000 (06:50 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:50:26 +0000 (06:50 +0000)
darcs-hash:20040130065026-2ba56-2414def8e7605a06bbf70edc7f9be4b6b17dc7d1.gz

CHANGES
src/org/xwt/XWF.java

diff --git a/CHANGES b/CHANGES
index ed87a00..34b535f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 02-Sep megacz Surface.java, Main.java: don't quit due to disposal of
               last surface unless initialization is complete.
 
+03-Sep megacz XWF.java: code to handle .xwf's that don't include the
+              underscore character.
+
 
index 3c02da8..c3d43a2 100644 (file)
@@ -78,7 +78,10 @@ public class XWF {
         int left = x;
         for(int i=0; i<text.length(); i++) {
             int c = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".indexOf(text.charAt(i));
-            if (c == -1 || metrics[c] == null) { left += metrics[64][4]; continue; }
+            if (c == -1 || metrics[c] == null) {
+               left += metrics[64] != null ? metrics[64][4] : 10;
+               continue;
+           }
             buf.drawPicture(pg,
                             left,
                             y - (metrics[c][5] - metrics[c][2]),