diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-24 13:51:13 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-24 14:27:58 (GMT) |
commit | 6d0002fe9bc91b9901e56050d247fbded09c9c76 (patch) | |
tree | e6b14b3d69512a7bb62ccf69ae3f656a227e82d2 /src/gui/text/qfont.cpp | |
parent | 4a4458d1cf5ec7885c6f63f739b7ee80c70ad211 (diff) | |
download | Qt-6d0002fe9bc91b9901e56050d247fbded09c9c76.zip Qt-6d0002fe9bc91b9901e56050d247fbded09c9c76.tar.gz Qt-6d0002fe9bc91b9901e56050d247fbded09c9c76.tar.bz2 |
Add QFont::ForceIntegerMetrics style strategy flag
WebKit uses integers internally to deal with positioning and sizing of
text objects, but on Mac, Qt uses floating point values. This caused a
discrepancy between the size used by WebKit to position text objects
and the actual size of the objects when rendered by Qt. The problem was
so bad that it has been holding back fixes for other bugs in the mac
font engine since these would make the WebKit bug more visible.
To work around the problem, we introduce a StyleStrategy flag in QFont
which allows you to force the use of integers all over the line. This
makes text rendering slightly different from native applications, but
should fix several issues with WebKit on Mac.
The WebKit-part of this patch will be submitted up-stream.
Reviewed-by: Simon Hausmann
Reviewed-by: Prasanth
Diffstat (limited to 'src/gui/text/qfont.cpp')
-rw-r--r-- | src/gui/text/qfont.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 9b85c04..99b9f40 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -1297,6 +1297,8 @@ QFont::StyleHint QFont::styleHint() const \value PreferQuality prefer the best quality font. The font matcher will use the nearest standard point size that the font supports. + \value ForceIntegerMetrics forces the use of integer values in font engines that support fractional + font metrics. */ /*! |