aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2018-03-24 16:14:07 -0400
committerMitch Riedstra <mitch@riedstra.us>2018-03-24 16:14:07 -0400
commit70f1040dc7afc9c8d11029e198a84935487b5033 (patch)
tree12ee3335b0abd909997c9c8c3033574e884d79b3
parentc5ba9c025b7ebc34979e839453528f6e4a18712d (diff)
downloadst-70f1040dc7afc9c8d11029e198a84935487b5033.tar.gz
st-70f1040dc7afc9c8d11029e198a84935487b5033.tar.xz
Disable bold fonts by default, look like xterm by default, use a sane font by default, and install to my home directory
-rw-r--r--config.def.h15
-rw-r--r--config.mk3
-rw-r--r--x.c9
3 files changed, 20 insertions, 7 deletions
diff --git a/config.def.h b/config.def.h
index 82b1b09..dde8469 100644
--- a/config.def.h
+++ b/config.def.h
@@ -5,8 +5,17 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
-static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
-static int borderpx = 2;
+// static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
+// static char *font = "Profont:pixelsize=15:antialias=false:autohint=false";
+static char *font = "ProggyTinyTTSZ:pixelsize=16:antialias=false:autohint=false";
+static int borderpx = 1;
+
+/*
+ * Disable bold shit by default because it doesn't work well with small fonts
+ */
+int disablebold = 1;
+int disableitalic = 1;
+int disableroman = 1;
/*
* What program is execed by st depends of these precedence rules:
@@ -63,7 +72,7 @@ static unsigned int cursorthickness = 2;
static int bellvolume = 0;
/* default TERM value */
-char *termname = "st-256color";
+char *termname = "xterm-256color";
/*
* spaces per tab
diff --git a/config.mk b/config.mk
index 0aceec4..5437040 100644
--- a/config.mk
+++ b/config.mk
@@ -4,7 +4,8 @@ VERSION = 0.7
# Customize below to fit your system
# paths
-PREFIX = /usr/local
+DESTDIR = /home/mitch/pkg
+PREFIX =
MANPREFIX = $(PREFIX)/share/man
X11INC = /usr/X11R6/include
diff --git a/x.c b/x.c
index d43a529..4f55421 100644
--- a/x.c
+++ b/x.c
@@ -951,17 +951,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 (xloadfont(&dc.ifont, pattern))
die("st: can't open font %s\n", 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("st: can't open font %s\n", 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("st: can't open font %s\n", fontstr);