[wiki] [sites] [st][patch] Fix disable_bold patch for st 0.8.2 || 8dcc
commit c9d0bc9ec89e44aa3d5ae70214a27b6f9a4bbe01
Author: 8dcc <8dcc.git_AT_gmail.com>
Date: Sun Apr 9 04:31:00 2023 +0200
[st][patch] Fix disable_bold patch for st 0.8.2
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
index 4fe6ac36..385f1b41 100644
--- 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
_AT_@ -41,18 +41,30 @@ index 5828a3b..9663fa6 100644
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)
+_AT_@ -966,17 +971,20 @@ 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);
+ FcPatternDel(pattern, FC_WEIGHT);
+- FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD);
++ if (!disablebold)
++ FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD);
+ if (xloadfont(&dc.ibfont, pattern))
+ die("can't open font %s
", fontstr);
+
+ FcPatternDel(pattern, FC_SLANT);
+- FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
++ if (!disableroman)
++ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
+ if (xloadfont(&dc.bfont, pattern))
+ die("can't open font %s
", fontstr);
+
--
-2.21.0
+2.39.2
Received on Sun Apr 09 2023 - 04:32:36 CEST
This archive was generated by hypermail 2.3.0
: Sun Apr 09 2023 - 04:36:48 CEST