]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix for font headers with long datatype
authorKelly Campbell <kellyc@apache.org>
Sun, 8 Apr 2001 14:02:05 +0000 (14:02 +0000)
committerKelly Campbell <kellyc@apache.org>
Sun, 8 Apr 2001 14:02:05 +0000 (14:02 +0000)
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

src/org/apache/fop/fonts/TTFSubSetFile.java

index 23652031a6ba32d023e0976e6b34937a0337d468..29d7a7ee44966193f4bb90ddbeb9026e7b7cc778 100644 (file)
@@ -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);