summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2016-08-17 13:03:59 +0200
committerKonstantin Ritt <ritt.ks@gmail.com>2016-08-18 16:01:58 +0000
commitb8c1efcb887a2aa313fd843aa16a5be84d4189e6 (patch)
treeb1b4c2af9a7357adaa33597f5016579fa5df7d71 /src
parent4531ae8d699d06197d8485702fc48214c5e4dda8 (diff)
DirectWrite: Fix calculating bounding box of glyphs
We don't support vertical text layouts in Qt, so the vertical advance should always be 0 (like it is in other engines). Since we were setting this, we would calculate the bounding box of strings in the DirectWrite engine as if the layouts were diagonal, adding up both the horizontal and vertical advances. [ChangeLog][QtGui][Windows] Fixed height of text bounding box when using no or vertical hinting preference, or when the device pixel ratio is different from 1. Task-number: QTBUG-51024 Change-Id: I329917eb8da71fdfdffe9651ca8f0f48d26b6a60 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
index 04a08d892a..f2758f6d90 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
@@ -436,7 +436,7 @@ glyph_metrics_t QWindowsFontEngineDirectWrite::boundingBox(glyph_t g)
width,
height,
advanceWidth,
- advanceHeight);
+ 0);
} else {
qErrnoWarning("%s: GetDesignGlyphMetrics failed", __FUNCTION__);
}