Skip to content

Commit

Permalink
PDFBOX-5729: add debug output about missing features
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1914437 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Dec 7, 2023
1 parent 3215675 commit 932eceb
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,28 @@ void read(TrueTypeFont ttf, TTFDataStream data) throws IOException
featureListTable = readFeatureList(data, start + featureListOffset);
lookupListTable = readLookupList(data, start + lookupListOffset);

LookupTable[] lookupTable = lookupListTable.getLookups();
for (FeatureRecord rec : featureListTable.getFeatureRecords())
{
FeatureTable tab = rec.getFeatureTable();
String tag = rec.getFeatureTag();
int[] indices = tab.getLookupListIndices();
for (int i = 0; i < indices.length; ++i)
{
int lookupType = lookupTable[indices[i]].getLookupType();

LookupSubTable[] lst = lookupTable[indices[i]].getSubTables();
if (lst.length == 0 || lst[0] == null)
{
for (int j = 0; j < lst.length; ++j)
{
LOG.debug("Type {} GSUB feature '{}' at index {} unavailable",
lookupType, tag, indices[i]);
}
}
}
}

GlyphSubstitutionDataExtractor glyphSubstitutionDataExtractor = new GlyphSubstitutionDataExtractor();

gsubData = glyphSubstitutionDataExtractor
Expand Down

0 comments on commit 932eceb

Please sign in to comment.