[cp-patches] FYI: Small patch for gnu/java/awt/font/opentype/truetype/VirtualMachine.java

Jeroen Frijters jeroen at sumatra.nl
Fri Jun 9 09:37:07 UTC 2006


Hi,

While trying to get True Type font rendering to work I ran into a
missing instruction. Fortunately it was a trivial one, so I implemented
it.

Regards,
Jeroen

2006-06-09  Jeroen Frijters  <jeroen at frijters.net>

        * gnu/java/awt/font/opentype/truetype/VirtualMachine.java
        (executeInstruction): Added NOT support.
-------------- next part --------------
Index: gnu/java/awt/font/opentype/truetype/VirtualMachine.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/font/opentype/truetype/VirtualMachine.java,v
retrieving revision 1.1
diff -u -r1.1 VirtualMachine.java
--- gnu/java/awt/font/opentype/truetype/VirtualMachine.java	30 Apr 2006 09:45:11 -0000	1.1
+++ gnu/java/awt/font/opentype/truetype/VirtualMachine.java	9 Jun 2006 09:26:59 -0000
@@ -1066,6 +1066,10 @@
       stack[sp] = ((e1 != 0) || (stack[sp] != 0)) ? 1 : 0;
       break;
 
+    case 0x5C: // NOT
+      stack[sp] = (stack[sp] != 0) ? 0 : 1;
+      break;
+
     case 0x5e: // SDB, Set Delta Base in the graphics state
       deltaBase = stack[sp--];
       break;
@@ -1764,7 +1768,7 @@
     /* 50 */ "LT", "LTEQ", "GT", "GTEQ",
     /* 54 */ "EQ", "NEQ", "INST_56", "INST_57",
     /* 58 */ "IF", "EIF", "AND", "OR",
-    /* 5c */ "INST_5C", "INST_5D", "SDB", "SDS",
+    /* 5c */ "NOT", "INST_5D", "SDB", "SDS",
     /* 60 */ "ADD", "SUB", "DIV", "MUL",
     /* 64 */ "ABS", "NEG", "FLOOR", "CEILING",
     /* 68 */ "ROUND[0]", "ROUND[1]", "ROUND[2]", "ROUND[3]",


More information about the Classpath-patches mailing list