You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by de...@apache.org on 2003/08/27 13:07:40 UTC
cvs commit: xml-batik/test-references/org/apache/batik/gvt ts.arabic.txt ts.cyrillic.txt ts.greek.txt ts.hebrew.txt ts.latin-ext.txt ts.latin.txt ts.svgpath.middle50.txt ts.svgpath.start35.txt ts.vert.orient0.txt ts.vert.orient180.txt ts.vert.orient270.txt ts.vert.orient90.txt ts.vertpath.beforeafter.txt ts.vertpath.negpos.txt ts.vertpath.supersub.txt
deweese 2003/08/27 04:07:40
Modified: . build.xml
sources/org/apache/batik/bridge BridgeException.java
SVGImageElementBridge.java
sources/org/apache/batik/svggen/font/table
GlyfCompositeDescript.java
Removed: test-references/org/apache/batik/gvt ts.arabic.txt
ts.cyrillic.txt ts.greek.txt ts.hebrew.txt
ts.latin-ext.txt ts.latin.txt
ts.svgpath.middle50.txt ts.svgpath.start35.txt
ts.vert.orient0.txt ts.vert.orient180.txt
ts.vert.orient270.txt ts.vert.orient90.txt
ts.vertpath.beforeafter.txt ts.vertpath.negpos.txt
ts.vertpath.supersub.txt
Log:
1) Bugfix in parsing some TrueType fonts fixed (thanks to Eric Bloch).
2) I/O exceptions from loading images now reference the image element
in question.
3) Removed some now unused test files.
Revision Changes Path
1.140 +2 -1 xml-batik/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-batik/build.xml,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -r1.139 -r1.140
--- build.xml 10 Aug 2003 18:03:15 -0000 1.139
+++ build.xml 27 Aug 2003 11:07:40 -0000 1.140
@@ -1086,6 +1086,7 @@
classname="${class-prefix}.test.xml.XMLTestSuiteRunner">
<!-- <jvmarg value="-Xrunhprof:format=b" /> -->
<!-- <jvmarg value="-Xrunhprof:net=localhost:7001,format=b" /> -->
+ <jvmarg value="-Xmx512m"/> <jvmarg value="-Xms64m"/>
<classpath>
<pathelement location="${dest}" />
<path refid="libs-classpath"/>
1.7 +11 -3 xml-batik/sources/org/apache/batik/bridge/BridgeException.java
Index: BridgeException.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/BridgeException.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- BridgeException.java 8 Aug 2003 11:38:50 -0000 1.6
+++ BridgeException.java 27 Aug 2003 11:07:40 -0000 1.7
@@ -124,11 +124,19 @@
* Returns the error message according to the error code and parameters.
*/
public String getMessage() {
- String uri = ((SVGDocument)e.getOwnerDocument()).getURL();
+ String uri;
+ String lname = "<Unknown Element>";
+ SVGDocument doc = null;
+ if (e != null) {
+ doc = (SVGDocument)e.getOwnerDocument();
+ lname = e.getLocalName();
+ }
+ if (doc == null) uri = "<Unknown Document>";
+ else uri = doc.getURL();
Object [] fullparams = new Object[params.length+3];
fullparams[0] = uri;
fullparams[1] = new Integer(line);
- fullparams[2] = e.getLocalName();
+ fullparams[2] = lname;
for (int i=0; i < params.length; ++i) {
fullparams[i+3] = params[i];
}
1.60 +5 -5 xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java
Index: SVGImageElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- SVGImageElementBridge.java 13 Aug 2003 11:01:16 -0000 1.59
+++ SVGImageElementBridge.java 27 Aug 2003 11:07:40 -0000 1.60
@@ -240,7 +240,7 @@
*/
ProtectedStream reference = null;
try {
- reference = openStream(purl);
+ reference = openStream(e, purl);
} catch (SecurityException ex) {
throw new BridgeException(e, ERR_URI_UNSECURE,
new Object[] {uriStr});
@@ -266,7 +266,7 @@
reference.retry();
} catch (IOException ioe) {
// Couldn't reset stream so reopen it.
- reference = openStream(purl);
+ reference = openStream(e, purl);
}
try {
@@ -289,7 +289,7 @@
reference.retry();
} catch (IOException ioe) {
// Couldn't reset stream so reopen it.
- reference = openStream(purl);
+ reference = openStream(e, purl);
}
try {
@@ -345,7 +345,7 @@
}
}
- protected ProtectedStream openStream(ParsedURL purl) {
+ protected ProtectedStream openStream(Element e, ParsedURL purl) {
ProtectedStream ret = null;
try {
List mimeTypes = new ArrayList
1.4 +12 -5 xml-batik/sources/org/apache/batik/svggen/font/table/GlyfCompositeDescript.java
Index: GlyfCompositeDescript.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/svggen/font/table/GlyfCompositeDescript.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- GlyfCompositeDescript.java 9 Aug 2003 16:58:41 -0000 1.3
+++ GlyfCompositeDescript.java 27 Aug 2003 11:07:40 -0000 1.4
@@ -65,7 +65,8 @@
private Vector components = new Vector();
- public GlyfCompositeDescript(GlyfTable parentTable, ByteArrayInputStream bais) {
+ public GlyfCompositeDescript(GlyfTable parentTable,
+ ByteArrayInputStream bais) {
super(parentTable, (short) -1, bais);
// Get all of the composite components
@@ -73,9 +74,15 @@
int firstIndex = 0;
int firstContour = 0;
do {
- components.addElement(comp = new GlyfCompositeComp(firstIndex, firstContour, bais));
- firstIndex += parentTable.getDescription(comp.getGlyphIndex()).getPointCount();
- firstContour += parentTable.getDescription(comp.getGlyphIndex()).getContourCount();
+ comp = new GlyfCompositeComp(firstIndex, firstContour, bais);
+ components.addElement(comp);
+
+ GlyphDescription desc;
+ desc = parentTable.getDescription(comp.getGlyphIndex());
+ if (desc != null) {
+ firstIndex += desc.getPointCount();
+ firstContour += desc.getContourCount();
+ }
} while ((comp.getFlags() & GlyfCompositeComp.MORE_COMPONENTS) != 0);
// Are there hinting intructions to read?
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org