commit 395bf04f90459da09e1d0b8882432683bbfe48e5
parent 72f84d1b104aa302802fe7f03859e999628437d6
Author: Matthew Carlson <matt@mcarlson.xyz>
Date: Fri, 2 Jul 2021 16:25:25 +0000
Merge branch 'fontsize' into st
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/x.c b/x.c
@@ -4,6 +4,7 @@
#include <limits.h>
#include <locale.h>
#include <signal.h>
+#include <stdlib.h>
#include <sys/select.h>
#include <time.h>
#include <unistd.h>
@@ -1237,7 +1238,7 @@ xinit(int cols, int rows)
die("could not init fontconfig.\n");
usedfont = (opt_font == NULL)? font : opt_font;
- xloadfonts(usedfont, 0);
+ xloadfonts(usedfont, defaultfontsize);
/* spare fonts */
xloadsparefonts();
@@ -2192,6 +2193,11 @@ main(int argc, char *argv[])
case 'v':
die("%s " VERSION "\n", argv0);
break;
+ case 'z':
+ defaultfontsize = strtod(EARGF(usage()), NULL);
+ if (!(defaultfontsize > 0))
+ usage();
+ break;
default:
usage();
} ARGEND;