mirror of
https://github.com/alrayyes/st
synced 2023-11-14 15:56:30 +00:00
44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
|
diff -up a/config.def.h b/config.def.h
|
||
|
--- 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 -up a/x.c b/x.c
|
||
|
--- a/x.c
|
||
|
+++ b/x.c
|
||
|
@@ -231,6 +231,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_alpha = NULL;
|
||
|
static char *opt_class = NULL;
|
||
|
static char **opt_cmd = NULL;
|
||
|
@@ -979,7 +984,10 @@ xloadfonts(char *fontstr, double fontsiz
|
||
|
win.cyo = ceilf(dc.font.height * (chscale - 1) / 2);
|
||
|
|
||
|
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);
|
||
|
|