summaryrefslogtreecommitdiffstats
path: root/desktop-plasma
diff options
context:
space:
mode:
authorWolfgang Müller2025-01-17 19:48:52 +0100
committerWolfgang Müller2025-01-17 19:48:52 +0100
commit11479b14d9ebcc4e5969f405c12e89e38cff0876 (patch)
treed37d9c6db46ee8671918adc5653817254aa2b9ae /desktop-plasma
parent6766c0deaa9e6073632ea9f339a69b8127cc1b16 (diff)
downloadportage-roles-11479b14d9ebcc4e5969f405c12e89e38cff0876.tar.gz
desktop-plasma: Add patch picking bold fonts in kde-apps/konsole
Normally the weight is computed relative to the font in use, so the weight chosen for bold characters when using a light font is "normal", and not "bold". We prefer the latter, and there seems to be no other way to configure this.
Diffstat (limited to '')
-rw-r--r--desktop-plasma/patches/kde-apps/konsole/0001-Always-pick-QFont-Bold-for-bold-fonts.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/desktop-plasma/patches/kde-apps/konsole/0001-Always-pick-QFont-Bold-for-bold-fonts.patch b/desktop-plasma/patches/kde-apps/konsole/0001-Always-pick-QFont-Bold-for-bold-fonts.patch
new file mode 100644
index 0000000..d2551fd
--- /dev/null
+++ b/desktop-plasma/patches/kde-apps/konsole/0001-Always-pick-QFont-Bold-for-bold-fonts.patch
@@ -0,0 +1,25 @@
+From 40c72bb232ff37c69fb1c300d2ea40e13051cdb0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Wolfgang=20M=C3=BCller?= <wolf@oriole.systems>
+Date: Wed, 2 Oct 2024 23:43:17 +0200
+Subject: [PATCH] Always pick QFont::Bold for bold fonts
+
+---
+ src/terminalDisplay/TerminalPainter.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/terminalDisplay/TerminalPainter.cpp b/src/terminalDisplay/TerminalPainter.cpp
+index cb8b8fbe9..4157b5989 100644
+--- a/src/terminalDisplay/TerminalPainter.cpp
++++ b/src/terminalDisplay/TerminalPainter.cpp
+@@ -211,7 +211,7 @@ void TerminalPainter::drawContents(Character *image,
+ };
+ const QFont::Weight normalWeight = static_cast<QFont::Weight>(m_parentDisplay->font().weight()); // Qt6: cast can go away
+ auto it = std::upper_bound(std::begin(FontWeights), std::end(FontWeights), normalWeight);
+- const QFont::Weight boldWeight = it != std::end(FontWeights) ? *it : QFont::Black;
++ const QFont::Weight boldWeight = it != std::end(FontWeights) ? QFont::Bold : QFont::Black;
+ paint.setLayoutDirection(Qt::LeftToRight);
+ const QColor *colorTable = m_parentDisplay->terminalColor()->colorTable();
+
+--
+2.46.2
+