D26185: Fix font rendering when compiled against Qt >= 5.14

Andreas Hartmetz noreply at phabricator.kde.org
Sat Dec 28 16:23:26 GMT 2019


ahartmetz added a comment.


  I think I see the problem. You pay for the //possibility// to have scaling with unhinted fonts. I am pretty sure that that isn't an acceptable way of handling it. Most Linux desktop fonts are intended to be used with some hinting (slight hinting usually?). QHighDpiScaling::isActive() returns true even when the scale factor is 1.0 as in my case. Looks like a Qt bug to me.
  
    diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
    index e28b40c240..05bd01f158 100644
    --- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
    +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
    @@ -611,7 +611,7 @@ QFontEngine::HintStyle defaultHintStyleFromMatch(QFont::HintingPreference hintin
         }
     
         if (QHighDpiScaling::isActive())
    -        return QFontEngine::HintNone;
    +        return QFontEngine::HintNone; // NNNNOOOOOOO
     
         int hint_style = 0;
         if (FcPatternGetInteger (match, FC_HINT_STYLE, 0, &hint_style) == FcResultMatch) {
    @@ -908,7 +908,7 @@ QFont QFontconfigDatabase::defaultFont() const
     void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef &fontDef) const
     {
         bool antialias = !(fontDef.styleStrategy & QFont::NoAntialias);
    -    bool forcedAntialiasSetting = !antialias || QHighDpiScaling::isActive();
    +    bool forcedAntialiasSetting = !antialias || QHighDpiScaling::isActive(); // NNNNOOOOOOO
     
         const QPlatformServices *services = QGuiApplicationPrivate::platformIntegration()->services();
         bool useXftConf = false;

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D26185

To: ahartmetz, #plasma, apol, davidedmundson
Cc: asturmlechner, dfaure, davidedmundson, anthonyfieroni, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191228/720f23a2/attachment.html>


More information about the Plasma-devel mailing list