aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-08-05 07:46:14 +0000
committerJeremias Maerki <jeremias@apache.org>2008-08-05 07:46:14 +0000
commit6b9e8ba185892b7a2a1ee79f6d462c0b07566bb6 (patch)
tree5d0dfae50e7a93ceb0f5be924e6b28d18ec3cab6 /src/java
parent0aa76570ad9c252f17ad5a955fab2e99a7b0de44 (diff)
downloadxmlgraphics-fop-6b9e8ba185892b7a2a1ee79f6d462c0b07566bb6.tar.gz
xmlgraphics-fop-6b9e8ba185892b7a2a1ee79f6d462c0b07566bb6.zip
Skip IO Exception when loading a PFM and an AFM could be loaded. The PFM is only a fallback and not necessary when the AFM is available. Motivation: The "URW Bookman L" fonts from GhostScript have bad PFM files.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@682616 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/fonts/type1/Type1FontLoader.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java b/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
index 5438d3a42..981f3ad69 100644
--- a/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
+++ b/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
@@ -100,6 +100,11 @@ public class Type1FontLoader extends FontLoader {
try {
pfm = new PFMFile();
pfm.load(pfmIn);
+ } catch (IOException ioe) {
+ if (afm == null) {
+ //Ignore the exception if we have a valid PFM. PFM is only the fallback.
+ throw ioe;
+ }
} finally {
IOUtils.closeQuietly(pfmIn);
}