From e94d776302b1188e5ca7a99cc6ea6811bcd0f106 Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Fri, 29 Mar 2019 11:04:42 +0100 Subject: [PATCH] initial import --- LICENSE.md | 22 ++++++++++ README.md | 4 ++ st-disable-bold-italic-fonts-0.8.2.diff | 58 +++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 st-disable-bold-italic-fonts-0.8.2.diff diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..7691a7a --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,22 @@ +The MIT License (MIT) +===================== + +Copyright © `2019` `Ryan Kes ` + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..297ce30 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# ST patches +Patches I've updated for [st](https://st.suckless.org/) that work with version 0.8.2 + +* [st-disable-bold-italic-fonts](https://st.suckless.org/patches/disable_bold_italic_fonts/) diff --git a/st-disable-bold-italic-fonts-0.8.2.diff b/st-disable-bold-italic-fonts-0.8.2.diff new file mode 100644 index 0000000..4fe6ac3 --- /dev/null +++ b/st-disable-bold-italic-fonts-0.8.2.diff @@ -0,0 +1,58 @@ +From 0856fbfcdae3f8e48db791984591b0bb8a91de68 Mon Sep 17 00:00:00 2001 +From: Ryan Kes +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 +@@ -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 +@@ -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; +@@ -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\n", fontstr); + +-- +2.21.0 +