From 5a7157d319477830426797532e02ac39d3b859f4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 11:29:03 +0200 Subject: Merging upstream version 4:24.2.1. Signed-off-by: Daniel Baumann --- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx') diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 3ad139b65f..2517618e10 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -956,18 +956,18 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y, double csdx = 0.0; double csdy = 0.0; - if (state->getFont()->getWMode()) + if (!state->getFont() || !state->getFont()->getWMode()) { - csdy = state->getCharSpace(); + csdx = state->getCharSpace(); if (*u == ' ') - csdy += state->getWordSpace(); + csdx += state->getWordSpace(); + csdx *= state->getHorizScaling(); } else { - csdx = state->getCharSpace(); + csdy = state->getCharSpace(); if (*u == ' ') - csdx += state->getWordSpace(); - csdx *= state->getHorizScaling(); + csdy += state->getWordSpace(); } double cstdx = 0.0; -- cgit v1.2.3