You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by to...@apache.org on 2001/07/17 22:57:49 UTC
cvs commit: xml-fop/src/org/apache/fop/fonts TTFFile.java
tore 01/07/17 13:57:49
Modified: src/org/apache/fop/fonts TTFFile.java
Log:
Submitted by: SASAKI Suguru (s-sasaki@hkg.odn.ne.jp)
Some glyphs are missed when more then one glyph maps to the same data,
this patch fixes it.
Revision Changes Path
1.5 +10 -5 xml-fop/src/org/apache/fop/fonts/TTFFile.java
Index: TTFFile.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fonts/TTFFile.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TTFFile.java 2001/04/16 16:07:30 1.4
+++ TTFFile.java 2001/07/17 20:57:47 1.5
@@ -1,4 +1,4 @@
-/* -- $Id: TTFFile.java,v 1.4 2001/04/16 16:07:30 tore Exp $ --
+/* -- $Id: TTFFile.java,v 1.5 2001/07/17 20:57:47 tore Exp $ --
*
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
@@ -200,14 +200,15 @@
lastChar = (short) j;
if (mtxPtr < mtx_tab.length) {
+ int glyphIdx;
if (cmap_rangeOffsets[i] != 0) {
int glyphOffset = glyphIdArrayOffset +
((cmap_rangeOffsets[i] / 2) +
(j - cmap_startCounts[i]) + (i) -
cmap_segCountX2 / 2) * 2;
in.seek_set(glyphOffset);
- int glyphIdx = (in.readTTFUShort() +
- cmap_deltas[i]) & 0xffff;
+ glyphIdx = (in.readTTFUShort() +
+ cmap_deltas[i]) & 0xffff;
unicodeMapping.addElement(
new UnicodeMapping(glyphIdx, j));
@@ -254,7 +255,7 @@
}
else {
- int glyphIdx = (j + cmap_deltas[i]) & 0xffff;
+ glyphIdx = (j + cmap_deltas[i]) & 0xffff;
if (glyphIdx < mtx_tab.length)
mtx_tab[glyphIdx] .unicodeIndex.addElement(
@@ -308,7 +309,11 @@
mtx_tab[(j+cmap_deltas[i]) & 0xffff].name);
*/
}
- mtxPtr++;
+ if (glyphIdx < mtx_tab.length) {
+ if (mtx_tab[glyphIdx].unicodeIndex.size() < 2) {
+ mtxPtr++;
+ }
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org