pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1798958 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/GlyphCache.java
Date Fri, 16 Jun 2017 16:19:07 GMT
Author: tilman
Date: Fri Jun 16 16:19:07 2017
New Revision: 1798958

URL: http://svn.apache.org/viewvc?rev=1798958&view=rev
Log:
PDFBOX-3819: use name only; adjust cast

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/GlyphCache.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/GlyphCache.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/GlyphCache.java?rev=1798958&r1=1798957&r2=1798958&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/GlyphCache.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/GlyphCache.java Fri Jun
16 16:19:07 2017
@@ -22,7 +22,7 @@ import java.util.HashMap;
 import java.util.Map;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.pdfbox.pdmodel.font.PDFont;
+import org.apache.pdfbox.pdmodel.font.PDFontLike;
 import org.apache.pdfbox.pdmodel.font.PDSimpleFont;
 import org.apache.pdfbox.pdmodel.font.PDType0Font;
 import org.apache.pdfbox.pdmodel.font.PDVectorFont;
@@ -56,7 +56,7 @@ final class GlyphCache
         {
             if (!font.hasGlyph(code))
             {
-                String fontName = ((PDFont)font).getName();
+                String fontName = ((PDFontLike) font).getName();
                 if (font instanceof PDType0Font)
                 {
                     int cid = ((PDType0Font) font).codeToCID(code);
@@ -67,7 +67,7 @@ final class GlyphCache
                 {
                     LOG.warn("No glyph for " + code + " in " + font.getClass().getSimpleName()
                             + " " + fontName + " (embedded or system font used: "
-                            + ((PDSimpleFont) font).getFontBoxFont() + ")");
+                            + ((PDSimpleFont) font).getFontBoxFont().getName() + ")");
                 }
                 else
                 {



Mime
View raw message