From: Kelly Campbell Date: Sun, 8 Apr 2001 14:02:05 +0000 (+0000) Subject: Bugfix for font headers with long datatype X-Git-Tag: PRE_CODEFORMATTING~182 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5d35d0c727b6c6c98768dfd97ef7e5eda5f7242f;p=xmlgraphics-fop.git Bugfix for font headers with long datatype PR: Obtained from: Submitted by: Rafal Maczewski Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194195 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/fonts/TTFSubSetFile.java b/src/org/apache/fop/fonts/TTFSubSetFile.java index 23652031a..29d7a7ee4 100644 --- a/src/org/apache/fop/fonts/TTFSubSetFile.java +++ b/src/org/apache/fop/fonts/TTFSubSetFile.java @@ -277,7 +277,8 @@ public class TTFSubSetFile extends TTFFile { output[currentPos+9] = 0; output[currentPos+10] = 0; output[currentPos+11] = 0; - output[currentPos+(int)entry.length-2] = 0; // long locaformat + output[currentPos+50] = 0; // long locaformat + output[currentPos+51] = 1; // long locaformat int checksum = getCheckSum(currentPos, (int)entry.length); writeULong(headDirOffset, checksum); @@ -341,7 +342,7 @@ public class TTFSubSetFile extends TTFFile { size = currentPos - start; - int checksum = getCheckSum(currentPos, size); + int checksum = getCheckSum(start, size); writeULong(glyfDirOffset, checksum); writeULong(glyfDirOffset+4, start); writeULong(glyfDirOffset+8, size);