aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java10
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java9
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat12.java23
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java10
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java25
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java11
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java17
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java8
8 files changed, 77 insertions, 36 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java
index e4e2e9ff7..3fae57d8b 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java
@@ -99,11 +99,9 @@ public abstract class CmapFormat {
@Override
public String toString() {
- return "format: " +
- getFormat() +
- ", length: " +
- getLength() +
- ", language: " +
- getLanguage();
+ return
+ " format: " + getFormat() + "\n" +
+ " length: " + getLength() + "\n" +
+ " language: " + getLanguage() + "\n";
}
}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java
index 451a5204f..7603ff6f0 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java
@@ -21,6 +21,7 @@ package jogamp.graph.font.typecast.ot.table;
import java.io.DataInput;
import java.io.IOException;
+import java.util.Arrays;
/**
* Format 0: Byte encoding table
@@ -95,4 +96,12 @@ public class CmapFormat0 extends CmapFormat {
return 0;
}
}
+
+ @Override
+ public String toString() {
+ return super.toString() +
+ " format: " + getFormat() + "\n" +
+ " language: " + getLanguage() + "\n" +
+ " glyphIdArray: " + Arrays.toString(_glyphIdArray) + "\n";
+ }
}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat12.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat12.java
index 2554d30bb..a331a8f4f 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat12.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat12.java
@@ -112,7 +112,26 @@ public class CmapFormat12 extends CmapFormat {
@Override
public String toString() {
return super.toString() +
- ", nGroups: " +
- _nGroups;
+ " format: " + getFormat() + "\n" +
+ " language: " + getLanguage() + "\n" +
+ " nGroups: " + _nGroups + "\n" +
+ " mapping: " + toStringMappingTable() + "\n";
}
+
+ private String toStringMappingTable() {
+ StringBuilder result = new StringBuilder();
+ for (int n = 0; n < _nGroups; n++) {
+ if (n > 0) {
+ result.append(", ");
+ }
+ result.append("[");
+ result.append(_startCharCode[n]);
+ result.append(", ");
+ result.append(_endCharCode[n]);
+ result.append("]: ");
+ result.append(_startGlyphId[n]);
+ }
+ return result.toString();
+ }
+
}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java
index 7b3265810..cd4da47ee 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java
@@ -21,6 +21,7 @@ package jogamp.graph.font.typecast.ot.table;
import java.io.DataInput;
import java.io.IOException;
+import java.util.Arrays;
/**
* Format 2: High-byte mapping through table.
@@ -232,4 +233,13 @@ public class CmapFormat2 extends CmapFormat {
}
return glyphIndex;
}
+
+ @Override
+ public String toString() {
+ return super.toString() +
+ " format: " + getFormat() + "\n" +
+ " language: " + getLanguage() + "\n" +
+ " subHeaderKeys: " + Arrays.toString(_subHeaderKeys) + "\n" +
+ " glyphIndexArray:" + Arrays.toString(_glyphIndexArray) + "\n";
+ }
}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java
index a9d0e1378..70f1bd751 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java
@@ -205,21 +205,14 @@ public class CmapFormat4 extends CmapFormat {
@Override
public String toString() {
return super.toString() +
- ", segCountX2: " +
- _segCountX2 +
- ", searchRange: " +
- _searchRange +
- ", entrySelector: " +
- _entrySelector +
- ", rangeShift: " +
- _rangeShift +
- ", endCode: " +
- Arrays.toString(_endCode) +
- ", startCode: " +
- Arrays.toString(_endCode) +
- ", idDelta: " +
- Arrays.toString(_idDelta) +
- ", idRangeOffset: " +
- Arrays.toString(_idRangeOffset);
+ " format: " + getFormat() + "\n" +
+ " segCountX2: " + _segCountX2 + "\n" +
+ " searchRange: " + _searchRange + "\n" +
+ " entrySelector: " + _entrySelector + "\n" +
+ " rangeShift: " + _rangeShift + "\n" +
+ " endCode: " + Arrays.toString(_endCode) + "\n" +
+ " startCode: " + Arrays.toString(_startCode) + "\n" +
+ " idDelta: " + Arrays.toString(_idDelta) + "\n" +
+ " idRangeOffset: " + Arrays.toString(_idRangeOffset) + "\n";
}
}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java
index daf12675c..e59ec6043 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java
@@ -20,6 +20,7 @@ package jogamp.graph.font.typecast.ot.table;
import java.io.DataInput;
import java.io.IOException;
+import java.util.Arrays;
/**
* Format 6: Trimmed table mapping
@@ -83,4 +84,14 @@ public class CmapFormat6 extends CmapFormat {
return 0;
}
}
+
+ @Override
+ public String toString() {
+ return super.toString() +
+ " format: " + getFormat() + "\n" +
+ " language: " + getLanguage() + "\n" +
+ " firstCode: " + _firstCode + "\n" +
+ " entryCount: " + _entryCount + "\n" +
+ " glyphIdArray: " + Arrays.toString(_glyphIdArray) + "\n";
+ }
}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java
index 99de551f5..18c6805a2 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java
@@ -142,16 +142,13 @@ public class CmapIndexEntry implements Comparable<CmapIndexEntry> {
@Override
public String toString() {
- return "platform id: " +
- _platformId +
- " (" +
- ID.getPlatformName((short) _platformId) +
- "), encoding id: " +
- _encodingId +
- " (" +
- ID.getEncodingName((short) _platformId, (short) _encodingId) +
- "), offset: " +
- _offset;
+ return
+ " Index entry\n"+
+ " -----------\n"+
+ " platformId: " + _platformId + " (" + ID.getPlatformName((short) _platformId) + ")\n" +
+ " encodingId: " + _encodingId + " (" + ID.getEncodingName((short) _platformId, (short) _encodingId) + ")\n" +
+ " offset: " + _offset + "\n" +
+ _format;
}
@Override
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java
index 3a2dffca2..0664cca66 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java
@@ -206,11 +206,15 @@ public class CmapTable implements Table {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder().append("cmap\n");
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("cmap Table\n");
+ sb.append("----------\n");
+ sb.append(" numTables: " + _numTables + "\n");
// Get each of the index entries
for (int i = 0; i < _numTables; i++) {
- sb.append("\t").append(_entries[i].toString()).append("\n");
+ sb.append("\n").append(_entries[i].toString());
}
// Get each of the tables