summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 15454a4501b5..d3e39887e32e 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -849,9 +849,18 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y,
double csdx = 0.0;
double csdy = 0.0;
if (state->getFont()->getWMode())
+ {
csdy = state->getCharSpace();
+ if (*u == ' ')
+ csdy += state->getWordSpace();
+ }
else
- csdx = state->getCharSpace() * state->getHorizScaling();
+ {
+ csdx = state->getCharSpace();
+ if (*u == ' ')
+ csdx += state->getWordSpace();
+ csdx *= state->getHorizScaling();
+ }
double cstdx = 0.0;
double cstdy = 0.0;