feat: add patch defaultfontsize and etc.

This commit is contained in:
2025-05-03 18:50:43 +04:00
parent c0a453cfa3
commit 6be2a4fcb5
2 changed files with 111 additions and 3 deletions

11
x.c
View File

@@ -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>
@@ -1249,7 +1250,8 @@ 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();
@@ -1750,7 +1752,7 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og, Line line, int le
break;
/* FALLTHROUGH */
case 8: /* steady st cursor */
g.u = xsetcursor;
g.u = (unsigned int) xsetcursor;
xdrawglyph(g, cx, cy);
break;
}
@@ -2259,6 +2261,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;