summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpdf.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-07 10:18:50 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-07 10:24:33 +0200
commit5d6073be27cb951b692bbcc4dc0dd54cc09c9fd4 (patch)
treec87c236cd1b9c15eb5f40df3d86915687ab6c59a /src/gui/painting/qpdf.cpp
parent97d7d80e7355019bb23bb03c2a82908e4436deb0 (diff)
parentbbb67ca32cebad312f02e916dff54e591b92af24 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
Diffstat (limited to 'src/gui/painting/qpdf.cpp')
-rw-r--r--src/gui/painting/qpdf.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 25e051d739..2b892159c5 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -2808,6 +2808,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
@@ -2884,6 +2885,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 "