summaryrefslogtreecommitdiff
path: root/external/ikvm/openjdk/sun/font/StandardGlyphVector.java
diff options
context:
space:
mode:
Diffstat (limited to 'external/ikvm/openjdk/sun/font/StandardGlyphVector.java')
-rw-r--r--external/ikvm/openjdk/sun/font/StandardGlyphVector.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/external/ikvm/openjdk/sun/font/StandardGlyphVector.java b/external/ikvm/openjdk/sun/font/StandardGlyphVector.java
index aec6572efb..fb3de314fa 100644
--- a/external/ikvm/openjdk/sun/font/StandardGlyphVector.java
+++ b/external/ikvm/openjdk/sun/font/StandardGlyphVector.java
@@ -94,8 +94,21 @@ public class StandardGlyphVector extends GlyphVector{
this(font, getString(iter), frc);
}
- public StandardGlyphVector(Font font, int[] glyphs, FontRenderContext frc) {
- throw new NotYetImplementedError();
+ public StandardGlyphVector( Font font, int[] glyphs, FontRenderContext frc ) {
+ this( font, glyphs2chars(glyphs), frc );
+ }
+
+ /**
+ * Symmetric to {@link #getGlyphCodes(int, int, int[])}
+ * Currently there is no real mapping possible between the chars and the glyph IDs in the TTF file
+ */
+ private static char[] glyphs2chars( int[] glyphs ) {
+ int count = glyphs.length;
+ char[] text = new char[count];
+ for( int i = 0; i < count; ++i ) {
+ text[i] = (char)glyphs[i];
+ }
+ return text;
}
/////////////////////////////