From 41698bb5c1a9211e9ef7eea25b9c9c033518cd14 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 15 Jan 2025 14:52:55 +0100 Subject: [PATCH] FontConfig: Don't register hardcoded fonts as color fonts This amends 16850709306589a2433c0038605d365a6b6bedad. The patch aimed to pass false for the color font parameter, but got it in the wrong position, so it passed false for the pixel size instead. The registerFont() function is a real mess, and it should be cleaned up, but this at least fixes the immediate bug. Task-number: QTBUG-132821 Change-Id: Id54989960aa5f86d3c79423d004530bb6a4fa475 Reviewed-by: Eirik Aavitsland (cherry picked from commit 0107e05e50761dd29a3d968baa9f502ade41e064) Reviewed-by: Qt Cherry-pick Bot --- src/gui/text/unix/qfontconfigdatabase.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/text/unix/qfontconfigdatabase.cpp b/src/gui/text/unix/qfontconfigdatabase.cpp index 5294278369f..de6618fc3f5 100644 --- a/src/gui/text/unix/qfontconfigdatabase.cpp +++ b/src/gui/text/unix/qfontconfigdatabase.cpp @@ -620,9 +620,9 @@ void QFontconfigDatabase::populateFontDatabase() while (f->qtname) { QString familyQtName = QString::fromLatin1(f->qtname); - registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleNormal,QFont::Unstretched,true,true,false,0,f->fixed,ws,nullptr); - registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleItalic,QFont::Unstretched,true,true,false,0,f->fixed,ws,nullptr); - registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleOblique,QFont::Unstretched,true,true,false,0,f->fixed,ws,nullptr); + registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleNormal,QFont::Unstretched,true,true,0,f->fixed,false,ws,nullptr); + registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleItalic,QFont::Unstretched,true,true,0,f->fixed,false,ws,nullptr); + registerFont(familyQtName,QString(),QString(),QFont::Normal,QFont::StyleOblique,QFont::Unstretched,true,true,0,f->fixed,false,ws,nullptr); ++f; }