From bf8220d231490280738f0fb7629f329bf332b2f0 Mon Sep 17 00:00:00 2001
From: Adrian Cumiskey
Date: Tue, 15 Apr 2008 08:53:51 +0000
Subject: 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
---
src/documentation/content/xdocs/trunk/events.xml | 6 ++++++
src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java | 4 ++--
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
@@ -275,6 +275,12 @@ producer.complain(this, "I'm tired", 23);]]>
scans FOP's sources for descendants of the EventProducer
interface and
uses QDox to parse these interfaces.
+
+ The event model XML files are generated during build by the Ant task mentioned above when
+ running the "resourcegen" task. So just run "ant resourcegen"
if you receive
+ a MissingResourceException
at runtime indicating that
+ "event-model.xml"
is missing.
+
Primarily, the QDox-based collector task records the parameters' names and types.
Furthermore, it extracts additional attributes embedded as Javadoc comments from
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 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);
--
cgit v1.2.3