Wed Jun 8 10:25:21 2011 UTC ()
add support for the interesting parts of ISO-2 and KOI8-R fonts
to the vga(4) driver


(drochner)
diff -r1.106 -r1.107 src/sys/dev/ic/vga.c
diff -r1.95 -r1.96 src/sys/dev/wscons/wsconsio.h
diff -r1.24 -r1.25 src/usr.sbin/wsfontload/wsfontload.8
diff -r1.14 -r1.15 src/usr.sbin/wsfontload/wsfontload.c

cvs diff -r1.106 -r1.107 src/sys/dev/ic/vga.c (expand / switch to unified diff)

--- src/sys/dev/ic/vga.c 2010/12/09 23:33:30 1.106
+++ src/sys/dev/ic/vga.c 2011/06/08 10:25:21 1.107
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vga.c,v 1.106 2010/12/09 23:33:30 christos Exp $ */ 1/* $NetBSD: vga.c,v 1.107 2011/06/08 10:25:21 drochner Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1995, 1996 Carnegie-Mellon University. 4 * Copyright (c) 1995, 1996 Carnegie-Mellon University.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Author: Chris G. Demetriou 7 * Author: Chris G. Demetriou
8 * 8 *
9 * Permission to use, copy, modify and distribute this software and 9 * Permission to use, copy, modify and distribute this software and
10 * its documentation is hereby granted, provided that both the copyright 10 * its documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the 11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions 12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation. 13 * thereof, and that both notices appear in supporting documentation.
14 * 14 *
@@ -18,27 +18,27 @@ @@ -18,27 +18,27 @@
18 * 18 *
19 * Carnegie Mellon requests users of this software to return to 19 * Carnegie Mellon requests users of this software to return to
20 * 20 *
21 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 21 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
22 * School of Computer Science 22 * School of Computer Science
23 * Carnegie Mellon University 23 * Carnegie Mellon University
24 * Pittsburgh PA 15213-3890 24 * Pittsburgh PA 15213-3890
25 * 25 *
26 * any improvements or extensions that they make and grant Carnegie the 26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes. 27 * rights to redistribute these changes.
28 */ 28 */
29 29
30#include <sys/cdefs.h> 30#include <sys/cdefs.h>
31__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.106 2010/12/09 23:33:30 christos Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.107 2011/06/08 10:25:21 drochner Exp $");
32 32
33/* for WSCONS_SUPPORT_PCVTFONTS */ 33/* for WSCONS_SUPPORT_PCVTFONTS */
34#include "opt_wsdisplay_compat.h" 34#include "opt_wsdisplay_compat.h"
35/* for WSDISPLAY_CUSTOM_BORDER */ 35/* for WSDISPLAY_CUSTOM_BORDER */
36#include "opt_wsdisplay_border.h" 36#include "opt_wsdisplay_border.h"
37/* for WSDISPLAY_CUSTOM_OUTPUT */ 37/* for WSDISPLAY_CUSTOM_OUTPUT */
38#include "opt_wsmsgattrs.h" 38#include "opt_wsmsgattrs.h"
39 39
40#include <sys/param.h> 40#include <sys/param.h>
41#include <sys/systm.h> 41#include <sys/systm.h>
42#include <sys/callout.h> 42#include <sys/callout.h>
43#include <sys/kernel.h> 43#include <sys/kernel.h>
44#include <sys/device.h> 44#include <sys/device.h>
@@ -301,27 +301,29 @@ const struct wsdisplay_accessops vga_acc @@ -301,27 +301,29 @@ const struct wsdisplay_accessops vga_acc
301 vga_scroll, 301 vga_scroll,
302#else 302#else
303 NULL, 303 NULL,
304#endif 304#endif
305}; 305};
306 306
307/* 307/*
308 * We want at least ASCII 32..127 be present in the 308 * We want at least ASCII 32..127 be present in the
309 * first font slot. 309 * first font slot.
310 */ 310 */
311#define vga_valid_primary_font(f) \ 311#define vga_valid_primary_font(f) \
312 (f->wsfont->encoding == WSDISPLAY_FONTENC_IBM || \ 312 (f->wsfont->encoding == WSDISPLAY_FONTENC_IBM || \
313 f->wsfont->encoding == WSDISPLAY_FONTENC_ISO || \ 313 f->wsfont->encoding == WSDISPLAY_FONTENC_ISO || \
314 f->wsfont->encoding == WSDISPLAY_FONTENC_ISO7) 314 f->wsfont->encoding == WSDISPLAY_FONTENC_ISO2 || \
 315 f->wsfont->encoding == WSDISPLAY_FONTENC_ISO7 || \
 316 f->wsfont->encoding == WSDISPLAY_FONTENC_KOI8_R)
315 317
316struct egavga_font * 318struct egavga_font *
317egavga_getfont(struct vga_config *vc, struct vgascreen *scr, const char *name, 319egavga_getfont(struct vga_config *vc, struct vgascreen *scr, const char *name,
318 int primary) 320 int primary)
319{ 321{
320 struct egavga_font *f; 322 struct egavga_font *f;
321 int cookie; 323 int cookie;
322 struct wsdisplay_font *wf; 324 struct wsdisplay_font *wf;
323 325
324 TAILQ_FOREACH(f, &vc->vc_fontlist, next) { 326 TAILQ_FOREACH(f, &vc->vc_fontlist, next) {
325 if (wsfont_matches(f->wsfont, name, 327 if (wsfont_matches(f->wsfont, name,
326 8, scr->pcs.type->fontheight, 0) && 328 8, scr->pcs.type->fontheight, 0) &&
327 (!primary || vga_valid_primary_font(f))) { 329 (!primary || vga_valid_primary_font(f))) {
@@ -1325,41 +1327,97 @@ vga_iso7_mapchar(int uni, u_int *index) @@ -1325,41 +1327,97 @@ vga_iso7_mapchar(int uni, u_int *index)
1325 /* U+0384 is at offset 0xb4 in the font */ 1327 /* U+0384 is at offset 0xb4 in the font */
1326 *index = uni - 0x0384 + 0xb4; 1328 *index = uni - 0x0384 + 0xb4;
1327 return (5); 1329 return (5);
1328 } 1330 }
1329 1331
1330 /* XXX more chars in the iso-9 font */ 1332 /* XXX more chars in the iso-9 font */
1331 1333
1332 *index = 0xa4; /* shaded rectangle */ 1334 *index = 0xa4; /* shaded rectangle */
1333 return (0); 1335 return (0);
1334} 1336}
1335 1337
1336#endif /* WSCONS_SUPPORT_ISO7FONTS */ 1338#endif /* WSCONS_SUPPORT_ISO7FONTS */
1337 1339
 1340static const uint16_t iso2_unichars[0x60] = {
 1341 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7,
 1342 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
 1343 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7,
 1344 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
 1345 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
 1346 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
 1347 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7,
 1348 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
 1349 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7,
 1350 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
 1351 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7,
 1352 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9
 1353};
 1354
 1355static const uint16_t koi8_unichars[0x40] = {
 1356 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433,
 1357 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E,
 1358 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432,
 1359 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A,
 1360 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413,
 1361 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E,
 1362 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
 1363 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A
 1364};
 1365
1338static int _vga_mapchar(void *, const struct egavga_font *, int, u_int *); 1366static int _vga_mapchar(void *, const struct egavga_font *, int, u_int *);
1339 1367
1340static int 1368static int
1341_vga_mapchar(void *id, const struct egavga_font *font, int uni, u_int *index) 1369_vga_mapchar(void *id, const struct egavga_font *font, int uni, u_int *index)
1342{ 1370{
1343 1371
1344 switch (font->wsfont->encoding) { 1372 switch (font->wsfont->encoding) {
1345 case WSDISPLAY_FONTENC_ISO: 1373 case WSDISPLAY_FONTENC_ISO:
1346 if (uni < 256) { 1374 if (uni < 256) {
1347 *index = uni; 1375 *index = uni;
1348 return (5); 1376 return (5);
1349 } else { 1377 } else {
1350 *index = ' '; 1378 *index = ' ';
1351 return (0); 1379 return (0);
1352 } 1380 }
 1381 case WSDISPLAY_FONTENC_ISO2:
 1382 if (uni < 0xa0) {
 1383 *index = uni;
 1384 return (5);
 1385 } else {
 1386 int i;
 1387 for (i = 0; i < 0x60; i++) {
 1388 if (uni == iso2_unichars[i]) {
 1389 *index = i + 0xa0;
 1390 return (5);
 1391 }
 1392 }
 1393 *index = 0xa4; /* currency sign */
 1394 return (0);
 1395 }
 1396 case WSDISPLAY_FONTENC_KOI8_R:
 1397 if (uni < 0x80) {
 1398 *index = uni;
 1399 return (5);
 1400 } else {
 1401 int i;
 1402 for (i = 0; i < 0x40; i++) {
 1403 if (uni == koi8_unichars[i]) {
 1404 *index = i + 0xc0;
 1405 return (5);
 1406 }
 1407 }
 1408 *index = 0x94; /* box */
 1409 return (0);
 1410 }
1353 case WSDISPLAY_FONTENC_IBM: 1411 case WSDISPLAY_FONTENC_IBM:
1354 return (pcdisplay_mapchar(id, uni, index)); 1412 return (pcdisplay_mapchar(id, uni, index));
1355#ifdef WSCONS_SUPPORT_PCVTFONTS 1413#ifdef WSCONS_SUPPORT_PCVTFONTS
1356 case WSDISPLAY_FONTENC_PCVT: 1414 case WSDISPLAY_FONTENC_PCVT:
1357 return (vga_pcvt_mapchar(uni, index)); 1415 return (vga_pcvt_mapchar(uni, index));
1358#endif 1416#endif
1359#ifdef WSCONS_SUPPORT_ISO7FONTS 1417#ifdef WSCONS_SUPPORT_ISO7FONTS
1360 case WSDISPLAY_FONTENC_ISO7: 1418 case WSDISPLAY_FONTENC_ISO7:
1361 return (vga_iso7_mapchar(uni, index)); 1419 return (vga_iso7_mapchar(uni, index));
1362#endif 1420#endif
1363 default: 1421 default:
1364#ifdef VGAFONTDEBUG 1422#ifdef VGAFONTDEBUG
1365 printf("_vga_mapchar: encoding=%d\n", font->wsfont->encoding); 1423 printf("_vga_mapchar: encoding=%d\n", font->wsfont->encoding);

cvs diff -r1.95 -r1.96 src/sys/dev/wscons/wsconsio.h (expand / switch to unified diff)

--- src/sys/dev/wscons/wsconsio.h 2011/02/06 18:26:53 1.95
+++ src/sys/dev/wscons/wsconsio.h 2011/06/08 10:25:21 1.96
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: wsconsio.h,v 1.95 2011/02/06 18:26:53 tsutsui Exp $ */ 1/* $NetBSD: wsconsio.h,v 1.96 2011/06/08 10:25:21 drochner Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. 4 * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software 14 * 3. All advertising materials mentioning features or use of this software
@@ -394,26 +394,27 @@ struct wsdisplay_cursor { @@ -394,26 +394,27 @@ struct wsdisplay_cursor {
394 * XXX WARNING 394 * XXX WARNING
395 * XXX The following wsdisplay definitions are very preliminary and are likely 395 * XXX The following wsdisplay definitions are very preliminary and are likely
396 * XXX to be changed without care about backwards compatibility! 396 * XXX to be changed without care about backwards compatibility!
397 */ 397 */
398struct wsdisplay_font { 398struct wsdisplay_font {
399 const char *name; 399 const char *name;
400 int firstchar, numchars; 400 int firstchar, numchars;
401 int encoding; 401 int encoding;
402#define WSDISPLAY_FONTENC_ISO 0 402#define WSDISPLAY_FONTENC_ISO 0
403#define WSDISPLAY_FONTENC_IBM 1 403#define WSDISPLAY_FONTENC_IBM 1
404#define WSDISPLAY_FONTENC_PCVT 2 404#define WSDISPLAY_FONTENC_PCVT 2
405#define WSDISPLAY_FONTENC_ISO7 3 /* greek */ 405#define WSDISPLAY_FONTENC_ISO7 3 /* greek */
406#define WSDISPLAY_FONTENC_ISO2 4 /* east european */ 406#define WSDISPLAY_FONTENC_ISO2 4 /* east european */
 407#define WSDISPLAY_FONTENC_KOI8_R 5 /* russian */
407 u_int fontwidth, fontheight, stride; 408 u_int fontwidth, fontheight, stride;
408#define WSDISPLAY_MAXFONTSZ (512*1024) 409#define WSDISPLAY_MAXFONTSZ (512*1024)
409 int bitorder, byteorder; 410 int bitorder, byteorder;
410#define WSDISPLAY_FONTORDER_KNOWN 0 /* i.e, no need to convert */ 411#define WSDISPLAY_FONTORDER_KNOWN 0 /* i.e, no need to convert */
411#define WSDISPLAY_FONTORDER_L2R 1 412#define WSDISPLAY_FONTORDER_L2R 1
412#define WSDISPLAY_FONTORDER_R2L 2 413#define WSDISPLAY_FONTORDER_R2L 2
413 void *data; 414 void *data;
414}; 415};
415#define WSDISPLAYIO_LDFONT _IOW('W', 77, struct wsdisplay_font) 416#define WSDISPLAYIO_LDFONT _IOW('W', 77, struct wsdisplay_font)
416 417
417struct wsdisplay_addscreendata { 418struct wsdisplay_addscreendata {
418 int idx; /* screen index */ 419 int idx; /* screen index */
419 char *screentype; 420 char *screentype;

cvs diff -r1.24 -r1.25 src/usr.sbin/wsfontload/wsfontload.8 (expand / switch to unified diff)

--- src/usr.sbin/wsfontload/wsfontload.8 2009/03/09 19:24:33 1.24
+++ src/usr.sbin/wsfontload/wsfontload.8 2011/06/08 10:25:21 1.25
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: wsfontload.8,v 1.24 2009/03/09 19:24:33 joerg Exp $ 1.\" $NetBSD: wsfontload.8,v 1.25 2011/06/08 10:25:21 drochner Exp $
2.\" 2.\"
3.\" Copyright (c) 1999, 2001 3.\" Copyright (c) 1999, 2001
4.\" Matthias Drochner. All rights reserved. 4.\" Matthias Drochner. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
@@ -75,37 +75,44 @@ The options are: @@ -75,37 +75,44 @@ The options are:
75.It Fl f Ar wsdev 75.It Fl f Ar wsdev
76Specify the device to operate on. 76Specify the device to operate on.
77Default is 77Default is
78.Pa /dev/wsfont . 78.Pa /dev/wsfont .
79.It Fl w Ar width 79.It Fl w Ar width
80Sets the width of a font character in pixels. 80Sets the width of a font character in pixels.
81Default is 8. 81Default is 8.
82.It Fl h Ar height 82.It Fl h Ar height
83Sets the height of a font character in pixels. 83Sets the height of a font character in pixels.
84Default is 16. 84Default is 16.
85.It Fl e Ar encoding 85.It Fl e Ar encoding
86Sets the encoding of the font. 86Sets the encoding of the font.
87This can be either a symbolic abbreviation or a numeric value. 87This can be either a symbolic abbreviation or a numeric value.
88Currently recognized abbreviations are 88Currently recognized abbreviations are:
89.Ql iso 89.Bl -tag -width xxxxxxx
90for ISO-8859-1 encoding, 90.It Ql iso
91.Ql ibm 91ISO-8859-1 encoding
92for IBM encoded fonts and 92.It Ql ibm
93.Ql pcvt 93IBM encoded fonts
94for the custom encoding of the supplemental fonts which came with 94.It Ql pcvt
95the 95the custom encoding of the supplemental fonts which came with the
96.Bx 96.Bx
97.Dq pcvt 97.Dq pcvt
98console driver. 98console driver
 99.It Ql iso2
 100ISO-8859-2 (east european) encoding
 101.It Ql iso7
 102ISO-8859-7 (greek) encoding
 103.It Ql koi8r
 104KOI8-R (russian) encoding
 105.El
99Per default, 106Per default,
100.Ql iso 107.Ql iso
101is assumed. 108is assumed.
102.It Fl N Ar name 109.It Fl N Ar name
103Specifies a name which can be used later to refer to the font. 110Specifies a name which can be used later to refer to the font.
104If none is given, the 111If none is given, the
105.Ar fontfile 112.Ar fontfile
106name is used to create one. 113name is used to create one.
107.It Fl b 114.It Fl b
108Specifies that the font data is ordered right-to-left bit wise. 115Specifies that the font data is ordered right-to-left bit wise.
109The default is left-to-right. 116The default is left-to-right.
110.It Fl B 117.It Fl B
111Specifies that the font data is ordered right-to-left byte wise. 118Specifies that the font data is ordered right-to-left byte wise.

cvs diff -r1.14 -r1.15 src/usr.sbin/wsfontload/wsfontload.c (expand / switch to unified diff)

--- src/usr.sbin/wsfontload/wsfontload.c 2009/04/19 02:25:48 1.14
+++ src/usr.sbin/wsfontload/wsfontload.c 2011/06/08 10:25:21 1.15
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: wsfontload.c,v 1.14 2009/04/19 02:25:48 lukem Exp $ */ 1/* $NetBSD: wsfontload.c,v 1.15 2011/06/08 10:25:21 drochner Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999 4 * Copyright (c) 1999
5 * Matthias Drochner. All rights reserved. 5 * Matthias Drochner. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -58,26 +58,27 @@ static struct { @@ -58,26 +58,27 @@ static struct {
58 { "l2r", WSDISPLAY_FONTORDER_L2R},  58 { "l2r", WSDISPLAY_FONTORDER_L2R},
59 { "r2l", WSDISPLAY_FONTORDER_R2L},  59 { "r2l", WSDISPLAY_FONTORDER_R2L},
60}; 60};
61 61
62static struct { 62static struct {
63 const char *name; 63 const char *name;
64 int val; 64 int val;
65} encodings[] = { 65} encodings[] = {
66 {"iso", WSDISPLAY_FONTENC_ISO}, 66 {"iso", WSDISPLAY_FONTENC_ISO},
67 {"ibm", WSDISPLAY_FONTENC_IBM}, 67 {"ibm", WSDISPLAY_FONTENC_IBM},
68 {"pcvt", WSDISPLAY_FONTENC_PCVT}, 68 {"pcvt", WSDISPLAY_FONTENC_PCVT},
69 {"iso7", WSDISPLAY_FONTENC_ISO7}, 69 {"iso7", WSDISPLAY_FONTENC_ISO7},
70 {"iso2", WSDISPLAY_FONTENC_ISO2}, 70 {"iso2", WSDISPLAY_FONTENC_ISO2},
 71 {"koi8r", WSDISPLAY_FONTENC_KOI8_R},
71}; 72};
72 73
73static void 74static void
74usage(void) 75usage(void)
75{ 76{
76 77
77 (void)fprintf(stderr, 78 (void)fprintf(stderr,
78 "usage: %s [-f wsdev] [-w width] [-h height] [-e encoding]" 79 "usage: %s [-f wsdev] [-w width] [-h height] [-e encoding]"
79 " [-N name] [-b] [-B] [fontfile]\n", 80 " [-N name] [-b] [-B] [fontfile]\n",
80 getprogname()); 81 getprogname());
81 exit(1); 82 exit(1);
82} 83}
83 84