[wiki] [sites] Added nobadweight patch || avalonwilliams

From: <git_AT_suckless.org>
Date: Tue, 08 Mar 2022 16:11:06 +0100

commit 4a587c348da8424baf6903437dfccbbcb107b07a
Author: avalonwilliams <avalonwilliams_AT_protonmail.com>
Date: Tue Mar 8 10:08:58 2022 -0500

    Added nobadweight patch
    
    Added patch that fixes bugs that some fonts experience in st. This
    isn't a general bug fix, and I'm almost 100% sure it may break other
    fonts, but it works for my usecase.

diff --git a/st.suckless.org/patches/nobadweight/index.md b/st.suckless.org/patches/nobadweight/index.md
new file mode 100644
index 00000000..4cc316ab
--- /dev/null
+++ b/st.suckless.org/patches/nobadweight/index.md
_AT_@ -0,0 +1,12 @@
+nobadweight
+===========
+Small patch that removes the badweight detection. Useful for fonts
+broken by this, like [Go Mono](https://go.dev/blog/go-fonts)
+
+Download
+--------
+* [st-nobadweight-20220308-4b53196.diff](st-nobadweight-20220308-4b53196.diff) (729)
+
+Authors
+-------
+* Avalon Williams <avalonwilliams_AT_protonmail.com>
diff --git a/st.suckless.org/patches/nobadweight/st-nobadweight-20220308-4b53196.diff b/st.suckless.org/patches/nobadweight/st-nobadweight-20220308-4b53196.diff
new file mode 100644
index 00000000..08f54caf
--- /dev/null
+++ b/st.suckless.org/patches/nobadweight/st-nobadweight-20220308-4b53196.diff
_AT_@ -0,0 +1,26 @@
+From 4b531966e2c630ddf1810ce68eb96656cb9cbfb2 Mon Sep 17 00:00:00 2001
+From: avalonwilliams <avalonwilliams_AT_protonmail.com>
+Date: Tue, 8 Mar 2022 09:51:03 -0500
+Subject: [PATCH] nobadweight patch
+
+Fixes issues that certain fonts have due to badweight detection.
+This in particular effects the Go Mono font
+---
+ x.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/x.c b/x.c
+index cd96575..be86e68 100644
+--- a/x.c
++++ b/x.c
+_AT_@ -957,7 +957,6 @@ xloadfont(Font *f, FcPattern *pattern)
+ XftResultMatch)) {
+ if ((XftPatternGetInteger(f->match->pattern, "weight", 0,
+ &haveattr) != XftResultMatch) || haveattr != wantattr) {
+- f->badweight = 1;
+ fputs("font weight does not match
", stderr);
+ }
+ }
+--
+2.35.1
+
Received on Tue Mar 08 2022 - 16:11:06 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 08 2022 - 16:12:52 CET