Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
libqt5-qtbase.10740
highdpi-0006-turn-off-font-hinting-when-active-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File highdpi-0006-turn-off-font-hinting-when-active-highdpi-scaling.patch of Package libqt5-qtbase.10740
From 0f7bc885aa7ae8cc3c448cc751aba4eba8c1c8b8 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete <paul.tvete@theqtcompany.com> Date: Mon, 22 Jun 2015 12:30:40 +0200 Subject: [PATCH] Turn off font hinting when active highdpi scaling Font hinting is done in the Qt coordinate system, and ends up looking very wrong if the painter is scaled. Now that high-DPI scaling is cross platform, we can move the responsibility for turning off hinting out of the platform plugin. Note that we cannot change our minds later, since Qt does not have a reference to all objects that perform text layout. Therefore, we turn off hinting if and only if there is at least one screen with scaling enabled at application startup. If this is not good enough for you, you should disable scaling and support resolution independence manually. Task-number: QTBUG-46615 Change-Id: I15fa09aa1e952cf3abeb2d8c26f13ad1f1cbf9bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> --- src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp index 112bb8e..022bc8b 100644 --- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp @@ -44,6 +44,7 @@ #include <QtGui/private/qfontengine_ft_p.h> #include <QtGui/private/qguiapplication_p.h> +#include <QtGui/private/qhighdpiscaling_p.h> #include <QtGui/qguiapplication.h> @@ -553,10 +554,8 @@ QFontEngine::HintStyle defaultHintStyleFromMatch(QFont::HintingPreference hintin break; } - if (QGuiApplication::platformNativeInterface()->nativeResourceForScreen("nofonthinting", - QGuiApplication::primaryScreen())) { + if (QHighDpiScaling::isActive()) return QFontEngine::HintNone; - } int hint_style = 0; if (FcPatternGetInteger (match, FC_HINT_STYLE, 0, &hint_style) == FcResultMatch) { -- 2.6.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor