summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpdf.cpp2
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 7b53966f81..644999e00a 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -2556,6 +2556,7 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti)
qreal size = ti.fontEngine->fontDef.pixelSize;
int synthesized = ti.fontEngine->synthesized();
qreal stretch = synthesized & QFontEngine::SynthesizedStretch ? ti.fontEngine->fontDef.stretch/100. : 1.;
+ Q_ASSERT(stretch > qreal(0));
QTransform trans;
// Build text rendering matrix (Trm). We need it to map the text area to user
@@ -2632,6 +2633,7 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti)
return;
int synthesized = ti.fontEngine->synthesized();
qreal stretch = synthesized & QFontEngine::SynthesizedStretch ? ti.fontEngine->fontDef.stretch/100. : 1.;
+ Q_ASSERT(stretch > qreal(0));
*currentPage << "BT\n"
<< "/F" << font->object_id << size << "Tf "
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp
index 08ebbc3be0..5af73a6f2b 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontengine.cpp
@@ -1293,6 +1293,7 @@ QFontEngine *QWindowsMultiFontEngine::loadEngine(int at)
fedw->fontDef.style = fontEngine->fontDef.style;
fedw->fontDef.family = fam;
fedw->fontDef.hintingPreference = fontEngine->fontDef.hintingPreference;
+ fedw->fontDef.stretch = fontEngine->fontDef.stretch;
return fedw;
} else {
qErrnoWarning("%s: CreateFontFace failed", __FUNCTION__);
@@ -1310,6 +1311,7 @@ QFontEngine *QWindowsMultiFontEngine::loadEngine(int at)
fe->fontDef.style = fontEngine->fontDef.style;
fe->fontDef.family = fam;
fe->fontDef.hintingPreference = fontEngine->fontDef.hintingPreference;
+ fe->fontDef.stretch = fontEngine->fontDef.stretch;
return fe;
}