Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.9
-
None
Description
I'm seeing a NullpointerException in CmapSubtable.java at line 601
java.lang.NullPointerException at org.apache.fontbox.ttf.CmapSubtable.getGlyphId(CmapSubtable.java:601)
The cause seems to be that the characterCodeToGlyphId is not initialised by all code paths.
The suggested fix would be to simply initialise the variable on declaration (line 48)
private Map<Integer, Integer> characterCodeToGlyphId = new HashMap<Integer, Integer>();
Successfully tested this above suggested solution with a local build.
Sorry, cannot share the PDF doc causing this.