feat: add patch defaultfontsize and etc.
This commit is contained in:
11
x.c
11
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>
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user