Author: ssteiner
Date: Wed Aug 12 14:12:59 2015
New Revision: 1695526

URL: http://svn.apache.org/r1695526
Log:
FOP-2491: Adobe Reader error with OTF subset PDF

Modified:
    
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java?rev=1695526&r1=1695525&r2=1695526&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java 
(original)
+++ 
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java 
Wed Aug 12 14:12:59 2015
@@ -490,9 +490,13 @@ public class OTFSubSetFile extends OTFFi
             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));



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-h...@xmlgraphics.apache.org

Reply via email to