pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1653085 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/ExternalFonts.java
Date Mon, 19 Jan 2015 19:39:23 GMT
Author: jahewson
Date: Mon Jan 19 19:39:23 2015
New Revision: 1653085

URL: http://svn.apache.org/r1653085
Log:
PDFBOX-2606: Use bundled fallback font when no other fonts are available

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/ExternalFonts.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/ExternalFonts.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/ExternalFonts.java?rev=1653085&r1=1653084&r2=1653085&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/ExternalFonts.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/ExternalFonts.java Mon
Jan 19 19:39:23 2015
@@ -260,14 +260,9 @@ public final class ExternalFonts
         Type1Equivalent type1Equivalent = getType1EquivalentFont(fontName);
         if (type1Equivalent == null)
         {
-            String message = fontProvider.toDebugString();
-            if (message != null)
-            {
-                // if we couldn't get a PFB font by now then there's no point continuing
-                log.error("No fallback font for '" + fontName + "', dumping debug information:");
-                log.error(message);
-            }
-            throw new IllegalStateException("No fonts available on the system for " + fontName);
+            // only systems with no fonts should reach this point, so we return a basic fallback
+            log.error("No fallback font for '" + fontName + "'");
+            return ttfFallbackFont;
         }
         return type1Equivalent;
     }



Mime
View raw message