1 From e3c97b85f0e94011e77af9259d379c956f9d6d64 Mon Sep 17 00:00:00 2001
2 From: Randy Palamar <palamar@ualberta.ca>
3 Date: Thu, 25 Feb 2021 23:53:47 -0700
4 Subject: [PATCH] support setting the default font size on invocation
9 2 files changed, 15 insertions(+), 1 deletion(-)
11 diff --git a/st.1 b/st.1
12 index 39120b4..57ddfb8 100644
15 @@ -22,6 +22,8 @@ st \- simple terminal
24 @@ -44,6 +46,8 @@ st \- simple terminal
33 @@ -91,6 +95,10 @@ defines the window title (default 'st').
34 embeds st within the window identified by
38 +sets the default fontsize to
44 diff --git a/x.c b/x.c
45 index 120e495..224f26e 100644
53 #include <sys/select.h>
56 @@ -1114,7 +1115,7 @@ xinit(int cols, int rows)
57 die("could not init fontconfig.\n");
59 usedfont = (opt_font == NULL)? font : opt_font;
60 - xloadfonts(usedfont, 0);
61 + xloadfonts(usedfont, defaultfontsize);
64 xw.cmap = XDefaultColormap(xw.dpy, xw.scr);
65 @@ -2038,6 +2039,11 @@ main(int argc, char *argv[])
67 die("%s " VERSION "\n", argv0);
70 + defaultfontsize = strtod(EARGF(usage()), NULL);
71 + if (!(defaultfontsize > 0))