aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java b/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
index d8ed13526..2c083add2 100644
--- a/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
+++ b/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
@@ -490,9 +490,13 @@ public class OTFSubSetFile extends OTFFile {
privateDictOffsets.add(privateDictOffset);
byte[] fdPrivateDictByteData = curFDFont.getPrivateDictData();
if (fdPrivateDict.get("Subrs") != null) {
+ int encodingValue = 0;
+ if (fdPrivateDict.get("Subrs").getOperandLength() == 1) {
+ encodingValue = 139;
+ }
fdPrivateDictByteData = updateOffset(fdPrivateDictByteData, fdPrivateDict.get("Subrs").getOffset(),
fdPrivateDict.get("Subrs").getOperandLength(),
- fdPrivateDictByteData.length);
+ fdPrivateDictByteData.length + encodingValue);
}
writeBytes(fdPrivateDictByteData);
writeIndex(fdSubrs.get(i));