pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1622594 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java
Date Fri, 05 Sep 2014 02:08:55 GMT
Author: jahewson
Date: Fri Sep  5 02:08:55 2014
New Revision: 1622594

URL: http://svn.apache.org/r1622594
Log:
PDFBOX-2315: Don't include character spacing in glyph adjustment

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java?rev=1622594&r1=1622593&r2=1622594&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFStreamEngine.java Fri Sep
 5 02:08:55 2014
@@ -332,7 +332,6 @@ public class PDFStreamEngine
         PDTextState textState = getGraphicsState().getTextState();
         float fontSize = textState.getFontSize();
         float horizontalScaling = textState.getHorizontalScaling() / 100f;
-        float charSpacing = textState.getCharacterSpacing();
         boolean isVertical = textState.getFont().isVertical();
 
         for (COSBase obj : array)
@@ -346,11 +345,11 @@ public class PDFStreamEngine
                 if (isVertical)
                 {
                     tx = 0;
-                    ty = -tj / 1000 * fontSize + charSpacing;
+                    ty = -tj / 1000 * fontSize;
                 }
                 else
                 {
-                    tx = (-tj / 1000 * fontSize + charSpacing) * horizontalScaling;
+                    tx = -tj / 1000 * fontSize * horizontalScaling;
                     ty = 0;
                 }
 



Mime
View raw message