pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1825832 - in /pdfbox/trunk: debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/DebugPageDrawer.java pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Date Sun, 04 Mar 2018 18:52:48 GMT
Author: tilman
Date: Sun Mar  4 18:52:48 2018
New Revision: 1825832

URL: http://svn.apache.org/viewvc?rev=1825832&view=rev
Log:
PDFBOX-3457: don't stretch glyphs if they are standard 14 or if they don't have an explicit
width, by John Hewson

Modified:
    pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/DebugPageDrawer.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/DebugPageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/DebugPageDrawer.java?rev=1825832&r1=1825831&r2=1825832&view=diff
==============================================================================
--- pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/DebugPageDrawer.java
(original)
+++ pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/DebugPageDrawer.java
Sun Mar  4 18:52:48 2018
@@ -83,7 +83,7 @@ final class DebugPageDrawer extends Page
                 }
 
                 // stretch non-embedded glyph if it does not match the width contained in
the PDF
-                if (!font.isEmbedded())
+                if (!font.isEmbedded() && !font.isVertical() && !font.isStandard14()
&& font.hasExplicitWidth(code))
                 {
                     float fontWidth = font.getWidthFromFont(code);
                     if (fontWidth > 0 && // ignore spaces

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1825832&r1=1825831&r2=1825832&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java Sun Mar
 4 18:52:48 2018
@@ -424,7 +424,7 @@ public class PageDrawer extends PDFGraph
             // Stretch non-embedded glyph if it does not match the height/width contained
in the PDF.
             // Vertical fonts have zero X displacement, so the following code scales to 0
if we don't skip it.
             // TODO: How should vertical fonts be handled?
-            if (!font.isEmbedded() && !font.isVertical())
+            if (!font.isEmbedded() && !font.isVertical() && !font.isStandard14()
&& font.hasExplicitWidth(code))
             {
                 float fontWidth = font.getWidthFromFont(code);
                 if (fontWidth > 0 && // ignore spaces



Mime
View raw message