From: Jeremias Maerki Date: Tue, 5 Aug 2008 07:46:14 +0000 (+0000) Subject: Skip IO Exception when loading a PFM and an AFM could be loaded. The PFM is only... X-Git-Tag: fop-1_0~471 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b9e8ba185892b7a2a1ee79f6d462c0b07566bb6;p=xmlgraphics-fop.git 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 --- 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); }