commit 57eea169eeab8ecd83d4c1a23d5f9bb3394d445e
Author: Ryan Kes <alrayyes_AT_gmail.com>
Date: Sat Mar 30 14:37:24 2019 +0100
added disable-bold-italic-fonts-0.8.2
diff --git a/st.suckless.org/patches/disable_bold_italic_fonts/index.md b/st.suckless.org/patches/disable_bold_italic_fonts/index.md
index 96637ca9..cef0571b 100644
--- a/st.suckless.org/patches/disable_bold_italic_fonts/index.md
+++ b/st.suckless.org/patches/disable_bold_italic_fonts/index.md
_AT_@ -9,7 +9,9 @@ such option as well.
Download
--------
* [st-disable-bold-italic-fonts.diff](st-disable-bold-italic-fonts.diff)
+* [st-disable-bold-italic-fonts-0.8.2.diff](st-disable-bold-italic-fonts-0.8.2.diff)
Author
------
* Alex Kozadaev - <snobb_AT_gmx at com>
+* Ryan Kes - <alrayyes_AT_gmail.com>
diff --git a/st.suckless.org/patches/disable_bold_italic_fonts/st-disable-bold-italic-fonts-0.8.2.diff b/st.suckless.org/patches/disable_bold_italic_fonts/st-disable-bold-italic-fonts-0.8.2.diff
new file mode 100644
index 00000000..4fe6ac36
--- /dev/null
+++ b/st.suckless.org/patches/disable_bold_italic_fonts/st-disable-bold-italic-fonts-0.8.2.diff
_AT_@ -0,0 +1,58 @@
+From 0856fbfcdae3f8e48db791984591b0bb8a91de68 Mon Sep 17 00:00:00 2001
+From: Ryan Kes <alrayyes_AT_gmail.com>
+Date: Fri, 29 Mar 2019 10:59:09 +0100
+Subject: [PATCH] st-disable-bold-italic-fonts-0.8.2
+
+---
+ config.def.h | 6 ++++++
+ x.c | 10 +++++++++-
+ 2 files changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/config.def.h b/config.def.h
+index 482901e..4f5aeac 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -6,6 +6,12 @@
+ * font: see
http://freedesktop.org/software/fontconfig/fontconfig-user.html
+ */
+ static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
++
++/* disable bold, italic and roman fonts globally */
++int disablebold = 0;
++int disableitalic = 0;
++int disableroman = 0;
++
+ static int borderpx = 2;
+
+ /*
+diff --git a/x.c b/x.c
+index 5828a3b..9663fa6 100644
+--- a/x.c
++++ b/x.c
+_AT_@ -233,6 +233,11 @@ static char *usedfont = NULL;
+ static double usedfontsize = 0;
+ static double defaultfontsize = 0;
+
++/* declared in config.h */
++extern int disablebold;
++extern int disableitalic;
++extern int disableroman;
++
+ static char *opt_class = NULL;
+ static char **opt_cmd = NULL;
+ static char *opt_embed = NULL;
+_AT_@ -960,7 +965,10 @@ xloadfonts(char *fontstr, double fontsize)
+ win.ch = ceilf(dc.font.height * chscale);
+
+ FcPatternDel(pattern, FC_SLANT);
+- FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
++ if (!disableitalic)
++ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
++ if (!disableroman)
++ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
+ if (xloadfont(&dc.ifont, pattern))
+ die("can't open font %s
", fontstr);
+
+--
+2.21.0
+
Received on Sat Mar 30 2019 - 14:37:26 CET