aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKelly Campbell <kellyc@apache.org>2001-04-08 14:02:05 +0000
committerKelly Campbell <kellyc@apache.org>2001-04-08 14:02:05 +0000
commit5d35d0c727b6c6c98768dfd97ef7e5eda5f7242f (patch)
treeb55ff897bc20901ab675fa1ee3da26b6c6c2e84d
parentd3f0575dd266bcee4a0088e3dad79e3a0d93f8a9 (diff)
downloadxmlgraphics-fop-5d35d0c727b6c6c98768dfd97ef7e5eda5f7242f.tar.gz
xmlgraphics-fop-5d35d0c727b6c6c98768dfd97ef7e5eda5f7242f.zip
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
-rw-r--r--src/org/apache/fop/fonts/TTFSubSetFile.java5
1 files changed, 3 insertions, 2 deletions
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);