commit b3bcfd5b80a9354dc7dcefe092f1b2742cd8b02b
parent 6aec9907d5a198997f0a241b326f889449c248ae
Author: Matthew Carlson <matt@mcarlson.xyz>
Date: Fri, 2 Jul 2021 16:24:27 +0000
fontsize
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>
@@ -1116,7 +1117,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);
/* colors */
xw.cmap = XDefaultColormap(xw.dpy, xw.scr);
@@ -2040,6 +2041,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;