commit 9aefe8e4f7fdc54eb8627489d3395991753c2348
parent 5d336c2796ccfadb0a7dceb9eb75c499be71fba2
Author: bakkeby <bakkeby@gmail.com>
Date: Mon, 16 Sep 2019 09:40:40 +0200
Adding bold-is-not-bright patch
Diffstat:
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
@@ -11,7 +11,7 @@ Refer to [https://dwm.suckless.org/](https://st.suckless.org/) for details on th
### Changelog:
-2019-09-16 - Added alpha and anysize patches
+2019-09-16 - Added alpha, anysize and bold-is-not-bright patches
### Patches included:
@@ -19,4 +19,8 @@ Refer to [https://dwm.suckless.org/](https://st.suckless.org/) for details on th
- adds transparency for the terminal
- [anysize](https://st.suckless.org/patches/anysize/)
- - allows st to reize to any pixel size rather than snapping to character width / height
-\ No newline at end of file
+ - allows st to reize to any pixel size rather than snapping to character width / height
+
+ - [bold-is-not-bright](https://st.suckless.org/patches/bold-is-not-bright/)
+ - by default bold text is rendered with a bold font in the bright variant of the current color
+ - this patch makes bold text rendered simply as bold, leaving the color unaffected
+\ No newline at end of file
diff --git a/patches.h b/patches.h
@@ -17,4 +17,10 @@
/* This patch allows st to reize to any pixel size rather than snapping to character width/height.
* https://st.suckless.org/patches/anysize/
*/
-#define ANYSIZE_PATCH 1
-\ No newline at end of file
+#define ANYSIZE_PATCH 1
+
+/* By default bold text is rendered with a bold font in the bright variant of the current color.
+ * This patch makes bold text rendered simply as bold, leaving the color unaffected.
+ * https://st.suckless.org/patches/bold-is-not-bright/
+ */
+#define BOLD_IS_NOT_BRIGHT_PATCH 1
+\ No newline at end of file
diff --git a/x.c b/x.c
@@ -1383,9 +1383,11 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
bg = &dc.col[base.bg];
}
+ #if !BOLD_IS_NOT_BRIGHT_PATCH
/* Change basic system colors [0-7] to bright system colors [8-15] */
if ((base.mode & ATTR_BOLD_FAINT) == ATTR_BOLD && BETWEEN(base.fg, 0, 7))
fg = &dc.col[base.fg + 8];
+ #endif // BOLD_IS_NOT_BRIGHT_PATCH
if (IS_SET(MODE_REVERSE)) {
if (fg == &dc.col[defaultfg]) {