pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1626354 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java
Date Fri, 19 Sep 2014 22:20:47 GMT
Author: jahewson
Date: Fri Sep 19 22:20:46 2014
New Revision: 1626354

URL: http://svn.apache.org/r1626354
Log:
PDFBOX-2367: Use un-mapped glyph names when accessing AFM metrics

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java?rev=1626354&r1=1626353&r2=1626354&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1Font.java Fri
Sep 19 22:20:46 2014
@@ -303,7 +303,8 @@ public class PDType1Font extends PDSimpl
         String name = codeToName(code);
         if (afm != null)
         {
-            return afm.getCharacterHeight(name); // todo: isn't this the y-advance, not the
height?
+            String afmName = getEncoding().getName(code);
+            return afm.getCharacterHeight(afmName); // todo: isn't this the y-advance, not
the height?
         }
         else
         {
@@ -317,7 +318,8 @@ public class PDType1Font extends PDSimpl
         String name = codeToName(code);
         if (afm != null)
         {
-            return afm.getCharacterWidth(name);
+            String afmName = getEncoding().getName(code);
+            return afm.getCharacterWidth(afmName);
         }
         else
         {



Mime
View raw message