diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2009-10-12 14:21:44 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2009-10-12 14:25:06 (GMT) |
commit | c02c25aca8a934d85570a665af4769ed2d851a77 (patch) | |
tree | 9b928fe698f88a9b7168747e9f258a21225ee40a /src/gui/text/qfontengine_x11.cpp | |
parent | 9a9f3646a2c7db0bb6d6edfd370175618471ad5a (diff) | |
download | Qt-c02c25aca8a934d85570a665af4769ed2d851a77.zip Qt-c02c25aca8a934d85570a665af4769ed2d851a77.tar.gz Qt-c02c25aca8a934d85570a665af4769ed2d851a77.tar.bz2 |
Fixed a bug visible in QPrintPreview with the X11 XLFD font engine.
QFontEngineXLFD::boundingBox() function did not take justification into
account when calculating the bounding box for a set of glyphs.
Reviewed-by: Eskil
Diffstat (limited to 'src/gui/text/qfontengine_x11.cpp')
-rw-r--r-- | src/gui/text/qfontengine_x11.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_x11.cpp b/src/gui/text/qfontengine_x11.cpp index ffc0eb4..ff3f628 100644 --- a/src/gui/text/qfontengine_x11.cpp +++ b/src/gui/text/qfontengine_x11.cpp @@ -491,7 +491,7 @@ glyph_metrics_t QFontEngineXLFD::boundingBox(const QGlyphLayout &glyphs) // XCharStruct::rbearing is defined as distance from left edge to rightmost pixel xmax = qMax(xmax, overall.xoff + glyphs.offsets[i].x + xcs->rbearing); ymax = qMax(ymax, y + xcs->ascent + xcs->descent); - overall.xoff += glyphs.advances_x[i]; + overall.xoff += glyphs.advances_x[i] + QFixed::fromFixed(glyphs.justifications[i].space_18d6); } else { QFixed size = _fs->ascent; overall.x = qMin(overall.x, overall.xoff); |