diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2011-01-10 15:46:48 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2011-01-10 16:31:55 (GMT) |
commit | 49257f86bdb090d97c387183e8f600bbb8a7eef3 (patch) | |
tree | 9d88b038d658b420b246ce4ea4706996a9f90a59 | |
parent | ac5c099cc3c5b8c7eec7a49fdeb8a21037230350 (diff) | |
download | Qt-49257f86bdb090d97c387183e8f600bbb8a7eef3.zip Qt-49257f86bdb090d97c387183e8f600bbb8a7eef3.tar.gz Qt-49257f86bdb090d97c387183e8f600bbb8a7eef3.tar.bz2 |
QFont/Windows: restrict the pixel size accuracy
Like on all other platforms, the pixel size accuracy is now restricted
to two digits after the decimal point.
Task-number: QTBUG-15688
Reviewed-by: Jiang Jiang
-rw-r--r-- | src/gui/text/qfontdatabase_win.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase_win.cpp b/src/gui/text/qfontdatabase_win.cpp index c46369b..e2c5116 100644 --- a/src/gui/text/qfontdatabase_win.cpp +++ b/src/gui/text/qfontdatabase_win.cpp @@ -920,7 +920,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script) // normalize the request to get better caching QFontDef req = d->request; if (req.pixelSize <= 0) - req.pixelSize = qreal((req.pointSize * d->dpi) / 72.); + req.pixelSize = floor((100.0 * req.pointSize * d->dpi) / 72. + 0.5) / 100; if (req.pixelSize < 1) req.pixelSize = 1; if (req.weight == 0) |