aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/fonts')
-rw-r--r--src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java b/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
index dbea48216..906fbd5e0 100644
--- a/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
+++ b/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
@@ -561,8 +561,12 @@ public class OTFSubSetFile extends OTFFile {
int privateOffset = privateEntry.getOperands().get(1).intValue();
Map<String, DICTEntry> privateDICT = cffReader.getPrivateDict(privateEntry);
- int localSubrOffset = privateOffset + privateDICT.get("Subrs").getOperands().get(0).intValue();
- localIndexSubr = cffReader.readIndex(localSubrOffset);
+ if (privateDICT.get("Subrs") != null) {
+ int localSubrOffset = privateOffset + privateDICT.get("Subrs").getOperands().get(0).intValue();
+ localIndexSubr = cffReader.readIndex(localSubrOffset);
+ } else {
+ localIndexSubr = cffReader.readIndex(null);
+ }
}
globalIndexSubr = cffReader.getGlobalIndexSubr();