pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1761485 - in /pdfbox/trunk: ./ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java
Date Mon, 19 Sep 2016 16:59:54 GMT
Author: lehmi
Date: Mon Sep 19 16:59:54 2016
New Revision: 1761485

URL: http://svn.apache.org/viewvc?rev=1761485&view=rev
Log:
PDFBOX-3412: append -Regular to fonts when searching for non-embedded fonts

Modified:
    pdfbox/trunk/   (props changed)
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java

Propchange: pdfbox/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 19 16:59:54 2016
@@ -1,3 +1,3 @@
-/pdfbox/branches/2.0:1760418
+/pdfbox/branches/2.0:1760418,1761484
 /pdfbox/branches/no-awt:1618517-1621410
 /pdfbox/no-awt:1618514-1618516

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java?rev=1761485&r1=1761484&r2=1761485&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapperImpl.java Mon
Sep 19 16:59:54 2016
@@ -444,6 +444,12 @@ final class FontMapperImpl implements Fo
             return info.getFont();
         }
 
+        // try appending "-Regular", works for Wingdings on windows
+        info = getFont(format, postScriptName + "-Regular");
+        if (info != null)
+        {
+            return info.getFont();
+        }
         // no matches
         return null;
     }



Mime
View raw message