diff options
author | Simon Steiner <ssteiner@apache.org> | 2015-08-12 14:12:59 +0000 |
---|---|---|
committer | Simon Steiner <ssteiner@apache.org> | 2015-08-12 14:12:59 +0000 |
commit | 6bb9f1531191c010126153159018a6de04dde7db (patch) | |
tree | e3199b298145d13767fce74eed5454bcb47c2bb7 /src | |
parent | cdab44e72103fb13f4400f54025b1f0af77cd0e6 (diff) | |
download | xmlgraphics-fop-6bb9f1531191c010126153159018a6de04dde7db.tar.gz xmlgraphics-fop-6bb9f1531191c010126153159018a6de04dde7db.zip |
FOP-2491: Adobe Reader error with OTF subset PDF
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1695526 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java | 6 |
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)); |