diff options
author | Frederic Cambus <fcambus@cvs.openbsd.org> | 2020-07-20 14:09:25 +0000 |
---|---|---|
committer | Frederic Cambus <fcambus@cvs.openbsd.org> | 2020-07-20 14:09:25 +0000 |
commit | 3b29beb82cf35dde1a523b60bea4f047b8e9aed3 (patch) | |
tree | d3b1605ab8c6ce8c0da7076e7ff6b8a586d20d98 /usr.sbin | |
parent | 57630f52259e2d2249c692ca791521aa36f801e7 (diff) |
Add a new column to wsfontload -l output, to report the number of
characters contained in a loaded font.
It's especially useful with user loaded fonts as they can contain
more than 256 characters.
OK sthen@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/wsfontload/wsfontload.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/wsfontload/wsfontload.c b/usr.sbin/wsfontload/wsfontload.c index 1cdc1bf50af..a6841a655e3 100644 --- a/usr.sbin/wsfontload/wsfontload.c +++ b/usr.sbin/wsfontload/wsfontload.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsfontload.c,v 1.21 2019/06/28 13:32:51 deraadt Exp $ */ +/* $OpenBSD: wsfontload.c,v 1.22 2020/07/20 14:09:24 fcambus Exp $ */ /* $NetBSD: wsfontload.c,v 1.2 2000/01/05 18:46:43 ad Exp $ */ /* @@ -141,7 +141,8 @@ main(int argc, char *argv[]) if (list) { i = 0; - p = " # Name Encoding W H"; + p = " # Name Encoding" \ + " W H Chars"; do { f.index = i; res = ioctl(wsfd, WSDISPLAYIO_LSFONT, &f); @@ -151,10 +152,11 @@ main(int argc, char *argv[]) puts(p); p = NULL; } - printf("%2d %-32s %8s %2d %2d\n", + printf("%2d %-32s %8s %2d %2d %8d\n", f.index, f.name, encodings[f.encoding].name, - f.fontwidth, f.fontheight); + f.fontwidth, f.fontheight, + f.numchars); } } i++; |