View | Details | Raw Unified | Return to bug 193910
Collapse All | Expand All

(-)sys/dev/vt/vt_core.c (+4 lines)
Lines 1948-1953 Link Here
1948
		vtfont_unref(vf);
1948
		vtfont_unref(vf);
1949
		return (error);
1949
		return (error);
1950
	}
1950
	}
1951
	case PIO_VDFTFONT: {
1952
		error = vt_change_font(vw, &vt_font_default);
1953
		return (error);
1954
	}
1951
	case GIO_SCRNMAP: {
1955
	case GIO_SCRNMAP: {
1952
		scrmap_t *sm = (scrmap_t *)data;
1956
		scrmap_t *sm = (scrmap_t *)data;
1953
1957
(-)sys/sys/consio.h (+1 lines)
Lines 239-244 Link Here
239
#define GIO_FONT8x16	_IOR('c', 69, fnt16_t)
239
#define GIO_FONT8x16	_IOR('c', 69, fnt16_t)
240
#define PIO_VFONT	_IOW('c', 70, vfnt_t)
240
#define PIO_VFONT	_IOW('c', 70, vfnt_t)
241
#define GIO_VFONT	_IOR('c', 71, vfnt_t)
241
#define GIO_VFONT	_IOR('c', 71, vfnt_t)
242
#define PIO_VDFTFONT	_IO('c', 72)
242
243
243
/* get video mode information */
244
/* get video mode information */
244
struct colors	{
245
struct colors	{
(-)usr.sbin/vidcontrol/vidcontrol.1 (+12 lines)
Lines 26-34 Link Here
26
.Op Fl c Ar appearance
26
.Op Fl c Ar appearance
27
.Oo
27
.Oo
28
.Fl f
28
.Fl f
29
.Oo
29
.Op Ar size
30
.Op Ar size
30
.Ar file
31
.Ar file
31
.Oc
32
.Oc
33
.Oc
32
.Op Fl g Ar geometry
34
.Op Fl g Ar geometry
33
.Op Fl h Ar size
35
.Op Fl h Ar size
34
.Op Fl i Cm adapter | mode
36
.Op Fl i Cm adapter | mode
Lines 136-143 Link Here
136
Print out current output screen map.
138
Print out current output screen map.
137
.It Xo
139
.It Xo
138
.Fl f
140
.Fl f
141
.Oo
139
.Op Ar size
142
.Op Ar size
140
.Ar file
143
.Ar file
144
.Oc
141
.Xc
145
.Xc
142
Load font
146
Load font
143
.Ar file
147
.Ar file
Lines 158-163 Link Here
158
.Nm
162
.Nm
159
will try to guess it from the size of font file.
163
will try to guess it from the size of font file.
160
.Pp
164
.Pp
165
When using
166
.Xr vt 4
167
both
168
.Ar size
169
and
170
.Ar font
171
can be omitted, and the default font will be loaded.
172
.Pp
161
Note that older video cards, such as MDA and CGA, do not support
173
Note that older video cards, such as MDA and CGA, do not support
162
software font.
174
software font.
163
See also
175
See also
(-)usr.sbin/vidcontrol/vidcontrol.c (-9 / +30 lines)
Lines 197-203 Link Here
197
{
197
{
198
	if (vt4_mode)
198
	if (vt4_mode)
199
		fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
199
		fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
200
"usage: vidcontrol [-CHPpx] [-b color] [-c appearance] [-f [size] file]",
200
"usage: vidcontrol [-CHPpx] [-b color] [-c appearance] [-f [[size] file]]",
201
"                  [-g geometry] [-h size] [-i adapter | mode]",
201
"                  [-g geometry] [-h size] [-i adapter | mode]",
202
"                  [-M char] [-m on | off] [-r foreground background]",
202
"                  [-M char] [-m on | off] [-r foreground background]",
203
"                  [-S on | off] [-s number] [-T xterm | cons25] [-t N | off]",
203
"                  [-S on | off] [-s number] [-T xterm | cons25] [-t N | off]",
Lines 409-414 Link Here
409
	return (t);
409
	return (t);
410
}
410
}
411
411
412
/*
413
 * Set the default vt font.
414
 */
415
416
static void
417
load_default_vt4font(void)
418
{
419
	if (ioctl(0, PIO_VDFTFONT) == -1) {
420
		revert();
421
		errc(1, errno, "loading default vt font");
422
	}
423
}
424
412
static int
425
static int
413
load_vt4font(FILE *f)
426
load_vt4font(FILE *f)
414
{
427
{
Lines 1328-1334 Link Here
1328
	dumpopt = DUMP_FBF;
1341
	dumpopt = DUMP_FBF;
1329
	termmode = NULL;
1342
	termmode = NULL;
1330
	if (vt4_mode)
1343
	if (vt4_mode)
1331
		opts = "b:Cc:f:g:h:Hi:M:m:pPr:S:s:T:t:x";
1344
		opts = "b:Cc:fg:h:Hi:M:m:pPr:S:s:T:t:x";
1332
	else
1345
	else
1333
		opts = "b:Cc:df:g:h:Hi:l:LM:m:pPr:S:s:T:t:x";
1346
		opts = "b:Cc:df:g:h:Hi:l:LM:m:pPr:S:s:T:t:x";
1334
1347
Lines 1349-1363 Link Here
1349
			print_scrnmap();
1362
			print_scrnmap();
1350
			break;
1363
			break;
1351
		case 'f':
1364
		case 'f':
1352
			type = optarg;
1365
			optarg = nextarg(argc, argv, &optind, 'f', 0);
1353
			font = nextarg(argc, argv, &optind, 'f', 0);
1366
			if (optarg != NULL) {
1367
				font = nextarg(argc, argv, &optind, 'f', 0);
1354
1368
1355
			if (font == NULL) {
1369
				if (font == NULL) {
1356
				type = NULL;
1370
					type = NULL;
1357
				font = optarg;
1371
					font = optarg;
1372
				} else
1373
					type = optarg;
1374
1375
				load_font(type, font);
1376
			} else {
1377
				if (!vt4_mode)
1378
					usage(); /* Switch syscons to ROM? */
1379
				
1380
				load_default_vt4font();
1358
			}
1381
			}
1359
1360
			load_font(type, font);
1361
			break;
1382
			break;
1362
		case 'g':
1383
		case 'g':
1363
			if (sscanf(optarg, "%dx%d",
1384
			if (sscanf(optarg, "%dx%d",

Return to bug 193910