depot/third_party/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch

27 lines
937 B
Diff
Raw Normal View History

From 4e8c14f1af9c332826e0454f4fd63e541edbaf5c Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
Date: Tue, 21 Mar 2023 15:48:49 +0800
Subject: [PATCH 5/6] qtbase: deal with a font face at index 0 as Regular for
Variable fonts
Reference: https://bugreports.qt.io/browse/QTBUG-111994
---
src/gui/text/unix/qfontconfigdatabase.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gui/text/unix/qfontconfigdatabase.cpp b/src/gui/text/unix/qfontconfigdatabase.cpp
index 474644b871f..c7a117fd134 100644
--- a/src/gui/text/unix/qfontconfigdatabase.cpp
+++ b/src/gui/text/unix/qfontconfigdatabase.cpp
@@ -556,6 +556,7 @@ void QFontconfigDatabase::populateFontDatabase()
FcObjectSetAdd(os, *p);
++p;
}
+ FcPatternAddBool(pattern, FC_VARIABLE, FcFalse);
fonts = FcFontList(nullptr, pattern, os);
FcObjectSetDestroy(os);
FcPatternDestroy(pattern);
--
2.39.2