Go to file
Eskil Abrahamsen Blomfeldt b625ff4c7b Fix printing with OS X platform plugin
Since we do not pass in the destination dpi to CoreText when making
the font, we need to pass in a point size which is scaled to include
the dpi change. The default dpi for the screen is 72, thus the
scale factor is destinationDpi/72. Since pixelSize = pointSize / 72 * dpi,
the pixelSize is actually the scaled point size for the destination
dpi, thus we pass in that instead.

Note that this only works because the default screen dpi on Mac is 72.
You can look at the CoreText font database in Qt 4.8 to verify that the
same trick is used there.

When 96 dpi is explicitly set (specifically for autotests), we need to
fall back to the old behavior, since the OSX platform plugin will then
use 72 for some fonts and 96 for others making it impossible to detect
the DPI in a consistent way. The correct fix would be to pass in the
dpi to the function, but until that fix can be made, we just use the
old code to keep the autotests passing.

Task-number: QTBUG-25555
Change-Id: Id20a273549c3abf3db56ef1c48553c0958c48d61
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-09-10 14:09:45 +02:00
bin de-duplicate code 2012-08-28 20:47:11 +02:00
config.tests in non-verbose mode, suppress qmake output as well 2012-09-10 00:27:21 +02:00
dist Mention logging related changes in changes-5.0.0 file 2012-09-08 01:43:57 +02:00
doc Moved gui example documentation to the proper location. 2012-09-01 11:21:46 +02:00
examples example: minor fix to gettingStarted - part5 2012-09-10 10:40:31 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Make the default Qt API be Qt 5.0's 2012-09-08 14:57:59 +02:00
qmake Removing duplicate includes 2012-09-09 18:30:43 +02:00
src Fix printing with OS X platform plugin 2012-09-10 14:09:45 +02:00
tests Remove old troll test servers' references. 2012-09-10 09:37:59 +02:00
tools Removing duplicate includes 2012-09-09 18:30:43 +02:00
util Make plugintest util work on Windows. 2012-08-30 13:51:22 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Updated .gitignore 2012-08-18 13:59:11 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure enable depend_includepath by default 2012-09-08 13:36:05 +02:00
configure.bat bypass configure bootstrap for non-git builds 2012-09-05 03:03:14 +02:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro Install right version of tools when x-compiling. 2012-07-17 12:52:48 +02:00
sync.profile Revert "Move QWindowSystemInterface out of qpa." 2012-08-03 00:38:09 +02:00