pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1711701 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStreamEngine.java
Date Sat, 31 Oct 2015 22:41:31 GMT
Author: tilman
Date: Sat Oct 31 22:41:31 2015
New Revision: 1711701

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

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStreamEngine.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStreamEngine.java?rev=1711701&r1=1711700&r2=1711701&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStreamEngine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStreamEngine.java Sat
Oct 31 22:41:31 2015
@@ -170,9 +170,7 @@ class PDFTextStreamEngine extends PDFStr
         float glyphSpaceToTextSpaceFactor = 1 / 1000f;
         if (font instanceof PDType3Font)
         {
-            // This will typically be 1000 but in the case of a type3 font
-            // this might be a different number
-            glyphSpaceToTextSpaceFactor = 1f / font.getFontMatrix().getScaleX();
+            glyphSpaceToTextSpaceFactor = font.getFontMatrix().getScaleX();
         }
 
         float spaceWidthText = 0;



Mime
View raw message