From 6b9e8ba185892b7a2a1ee79f6d462c0b07566bb6 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Tue, 5 Aug 2008 07:46:14 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/fonts/type1/Type1FontLoader.java | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- 2.39.5