From 6bb9f1531191c010126153159018a6de04dde7db Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Wed, 12 Aug 2015 14:12:59 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)); -- 2.39.5