* Same as for {@link FontOutput4a#getCharsUsed()}, except that this
* returns the chars used for the font subset.
* @return The chars actually used by the document.
*/
private char[] getSubsetCharsUsed() {
final Subset subset = this.fontUse.getSubset();
final Encoding encoding = this.fontUse.getEncoding();
final char[] charArray = new char[subset.numGlyphsUsed()];
for (int i = 0; i < subset.numGlyphsUsed(); i++) {
final int originalGlyphIndex = subset.decodeSubsetIndex(i);
final int codePoint = encoding.decodeCharacter(
(char) originalGlyphIndex);
charArray[i] = (char) codePoint;
}
return charArray;