From 992624ff48d34f3daf0861384ce020734901eb16 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Sun, 8 Mar 2009 17:20:50 +0100 Subject: [PATCH] workaround for zero word space problem --- lib/pdf/xpdf-changes.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/pdf/xpdf-changes.patch b/lib/pdf/xpdf-changes.patch index ff61806..4d17eec 100644 --- a/lib/pdf/xpdf-changes.patch +++ b/lib/pdf/xpdf-changes.patch @@ -958,3 +958,19 @@ diff -u -r1.5 -r1.6 return gFalse; } *name = new GString(s); +--- xpdf/Gfx.cc.orig 2009-03-08 17:10:40.000000000 +0100 ++++ xpdf/Gfx.cc 2009-03-08 17:18:23.000000000 +0100 +@@ -3188,8 +3188,11 @@ + u, (int)(sizeof(u) / sizeof(Unicode)), &uLen, + &dx, &dy, &originX, &originY); + dx = dx * state->getFontSize() + state->getCharSpace(); +- if (n == 1 && *p == ' ') { +- dx += state->getWordSpace(); ++ if (n == 1 && (*p == ' ' || *p == 0)) { ++ double w=state->getWordSpace(); ++ if (w==0 && dx==0) ++ w=state->getFontSize()/3; // workaround for zero word space ++ dx += w; + } + dx *= state->getHorizScaling(); + dy *= state->getFontSize(); -- 1.7.10.4