pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1711714 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java
Date Sun, 01 Nov 2015 03:52:39 GMT
Author: tilman
Date: Sun Nov  1 03:52:39 2015
New Revision: 1711714

URL: http://svn.apache.org/viewvc?rev=1711714&view=rev
Log:
PDFBOX-2508: correct calculation of glyphSpaceToTextSpaceFactor, remove misleading comment

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java?rev=1711714&r1=1711713&r2=1711714&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java Sun
Nov  1 03:52:39 2015
@@ -344,15 +344,13 @@ public class PDFStreamEngine
         float fontMatrixXScaling = 1/1000f;
         float fontMatrixYScaling = 1/1000f;
         float glyphSpaceToTextSpaceFactor = 1/1000f;
-        // expect Type3 fonts, those are providing the width of a character in glyph space
units
+        // except Type3 fonts, those are providing the width of a character in glyph space
units
         if (font instanceof PDType3Font)
         {
             PDMatrix fontMatrix = font.getFontMatrix();
             fontMatrixXScaling = fontMatrix.getValue(0, 0);
             fontMatrixYScaling = fontMatrix.getValue(1, 1);
-            //This will typically be 1000 but in the case of a type3 font
-            //this might be a different number
-            glyphSpaceToTextSpaceFactor = 1f/fontMatrix.getValue( 0, 0 );
+            glyphSpaceToTextSpaceFactor = fontMatrix.getValue( 0, 0 );
         }
         float spaceWidthText=0;
         try



Mime
View raw message