aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-04-15 08:53:51 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-04-15 08:53:51 +0000
commitbf8220d231490280738f0fb7629f329bf332b2f0 (patch)
tree987027188d56970835adb800832b7a36f5f13ccb
parent309f4e2998c676913e64070adda8dca5e3768fad (diff)
downloadxmlgraphics-fop-bf8220d231490280738f0fb7629f329bf332b2f0.tar.gz
xmlgraphics-fop-bf8220d231490280738f0fb7629f329bf332b2f0.zip
Merged revisions 647770,648122 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r647770 | jeremias | 2008-04-14 13:41:00 +0100 (Mon, 14 Apr 2008) | 1 line Fixed a possible follow-up NPE when the TTC cannot be loaded. ........ r648122 | jeremias | 2008-04-15 07:07:00 +0100 (Tue, 15 Apr 2008) | 1 line A note about the generation of event-model.xml. ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@648187 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/documentation/content/xdocs/trunk/events.xml6
-rw-r--r--src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/documentation/content/xdocs/trunk/events.xml b/src/documentation/content/xdocs/trunk/events.xml
index d2fe5318c..51a1bb6cc 100644
--- a/src/documentation/content/xdocs/trunk/events.xml
+++ b/src/documentation/content/xdocs/trunk/events.xml
@@ -276,6 +276,12 @@ producer.complain(this, "I'm tired", 23);]]></source>
uses <a href="http://qdox.codehaus.org/">QDox</a> to parse these interfaces.
</p>
<p>
+ The event model XML files are generated during build by the Ant task mentioned above when
+ running the "resourcegen" task. So just run <code>"ant resourcegen"</code> if you receive
+ a <code>MissingResourceException</code> at runtime indicating that
+ <code>"event-model.xml"</code> is missing.
+ </p>
+ <p>
Primarily, the QDox-based collector task records the parameters' names and types.
Furthermore, it extracts additional attributes embedded as Javadoc comments from
the methods. At the moment, the only such attribute is "@event.severity" which indicates
diff --git a/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java b/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
index b223ea7a1..ce33bc5b6 100644
--- a/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
+++ b/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
@@ -196,7 +196,6 @@ public class FontInfoFinder {
// Get a list of the TTC Font names
List ttcNames = null; //List<String>
String fontFileURI = fontUrl.toExternalForm().trim();
- TTFFontLoader ttfLoader = new TTFFontLoader(fontFileURI, resolver);
InputStream in = null;
try {
in = FontLoader.openFontUri(resolver, fontFileURI);
@@ -207,6 +206,7 @@ public class FontInfoFinder {
if (this.eventListener != null) {
this.eventListener.fontLoadingErrorAtAutoDetection(this, fontFileURI, e);
}
+ return null;
} finally {
IOUtils.closeQuietly(in);
}
@@ -223,7 +223,7 @@ public class FontInfoFinder {
log.debug("Loading " + fontName);
}
try {
- ttfLoader = new TTFFontLoader(fontFileURI, fontName, resolver);
+ TTFFontLoader ttfLoader = new TTFFontLoader(fontFileURI, fontName, resolver);
customFont = ttfLoader.getFont();
if (this.eventListener != null) {
customFont.setEventListener(this.eventListener);