==============================================================================
Done since 0.20.4 release
+- Fixed bug #15877: ArrayIndexOutOfBoundException with certain TrueType fonts.
+ Reserved name indexes were not ignored. (Jeremias Maerki)
- Fixed resolution of relative URLs in FopImageFactory with IBM JDK
Submitted by: Manuel Mall <mm@arcus.com.au> (see bug #14948)
- Fixed infinite loop when page-height="auto" (Oleg Tkachenko)
/*
* $Id$
- * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
+ * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/
// " Encoding: "+cmap_eid);
if (cmap_pid == 3 && cmap_eid == 1) {
- cmap_unioffset = cmap_offset;
+ cmap_unioffset = cmap_offset;
}
}
mtx_tab[i].name =
Glyphs.mac_glyph_names[mtx_tab[i].index];
} else {
- k = mtx_tab[i].index - NMACGLYPHS;
- /*
- * System.out.println(k+" i="+i+" mtx="+mtx_tab.length+
- * " ps="+ps_glyphs_buf.length);
- */
- mtx_tab[i].name = ps_glyphs_buf[k];
+ if (!mtx_tab[i].isIndexReserved()) {
+ k = mtx_tab[i].index - NMACGLYPHS;
+ /*
+ * System.out.println(k+" i="+i+" mtx="+mtx_tab.length+
+ * " ps="+ps_glyphs_buf.length);
+ */
+ mtx_tab[i].name = ps_glyphs_buf[k];
+ }
}
}
/*
* $Id$
- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/
}
public String toString(TTFFile t) {
- return new String("Glyph " + name + " index: " + index + " bbox [ "
+ return new String("Glyph " + name + " index: " + getIndexAsString() + " bbox ["
+ t.get_ttf_funit(bbox[0]) + " "
+ t.get_ttf_funit(bbox[1]) + " "
+ t.get_ttf_funit(bbox[2]) + " "
- + t.get_ttf_funit(bbox[3]) + "]" + "wx: "
+ + t.get_ttf_funit(bbox[3]) + "] wx: "
+ t.get_ttf_funit(wx));
}
+ /**
+ * Returns the index.
+ * @return int
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Determines whether this index represents a reserved character.
+ * @return True if it is reserved
+ */
+ public boolean isIndexReserved() {
+ return (getIndex() >= 32768) && (getIndex() <= 65535);
+ }
+
+ /**
+ * Returns a String representation of the index taking into account if
+ * the index is in the reserved range.
+ * @return index as String
+ */
+ public String getIndexAsString() {
+ if (isIndexReserved()) {
+ return Integer.toString(getIndex()) + " (reserved)";
+ } else {
+ return Integer.toString(getIndex());
+ }
+ }
+
+
}