qt6-qtbase/qtbase-fontconfig-dont-register-hardcoded-fonts-as-color-fonts.patch
Jan Grulich c09d648656 Backport additional fixes for emoji support
Resolves: RHEL-4218
2025-01-16 13:33:02 +01:00

35 lines
1.9 KiB
Diff

From 83864f8682da73a062a3ca32b928377dfc333021 Mon Sep 17 00:00:00 2001
From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
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.
Pick-to: 6.9
Task-number: QTBUG-132821
Change-Id: Id54989960aa5f86d3c79423d004530bb6a4fa475
---
diff --git a/src/gui/text/unix/qfontconfigdatabase.cpp b/src/gui/text/unix/qfontconfigdatabase.cpp
index 7866e341..790316a6 100644
--- a/src/gui/text/unix/qfontconfigdatabase.cpp
+++ b/src/gui/text/unix/qfontconfigdatabase.cpp
@@ -622,9 +622,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;
}