summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/classes/com/sun/opengl/util/j2d/TextRenderer.java2
-rwxr-xr-xtest/Issue344Test4.java10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/classes/com/sun/opengl/util/j2d/TextRenderer.java b/src/classes/com/sun/opengl/util/j2d/TextRenderer.java
index 82c60b7d6..c8493affa 100755
--- a/src/classes/com/sun/opengl/util/j2d/TextRenderer.java
+++ b/src/classes/com/sun/opengl/util/j2d/TextRenderer.java
@@ -1584,7 +1584,7 @@ public class TextRenderer {
}
glyphsOutput.add(new Glyph(buf.toString(),
// Any more glyphs after this run?
- i < lengthInGlyphs - 1));
+ i < lengthInGlyphs));
}
}
return glyphsOutput;
diff --git a/test/Issue344Test4.java b/test/Issue344Test4.java
new file mode 100755
index 000000000..1e077d2fd
--- /dev/null
+++ b/test/Issue344Test4.java
@@ -0,0 +1,10 @@
+public class Issue344Test4 extends Issue344Base {
+ protected String getText() {
+ // test 4 - unicode letter as second-to-last is rendered incorrectly
+ return "\u201CGreetings\u201D!";
+ }
+
+ public static void main(String[] args) {
+ new Issue344Test4().run(args);
+ }
+}