From: Matthias Kramm Date: Sun, 8 Mar 2009 16:20:50 +0000 (+0100) Subject: workaround for zero word space problem X-Git-Tag: release-0-9-0~72 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=992624ff48d34f3daf0861384ce020734901eb16 workaround for zero word space problem --- 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();