CVS commit: src/sys/dev/wsfont

2021-03-12 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Fri Mar 12 17:03:06 UTC 2021

Modified Files:
src/sys/dev/wsfont: spleen5x8.h spleen6x12.h

Log Message:
Update Spleen kernel fonts to version 1.9.0, bringing the following
improvements:

- Enlarge vertical line for consistency with other small sizes (5x8 version)
- Add full support for the Latin-1 Supplement Unicode block (6x12 version)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/wsfont/spleen5x8.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/wsfont/spleen6x12.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/spleen5x8.h
diff -u src/sys/dev/wsfont/spleen5x8.h:1.7 src/sys/dev/wsfont/spleen5x8.h:1.8
--- src/sys/dev/wsfont/spleen5x8.h:1.7	Mon Jul 20 13:41:16 2020
+++ src/sys/dev/wsfont/spleen5x8.h	Fri Mar 12 17:03:06 2021
@@ -1,8 +1,8 @@
-/*	$NetBSD: spleen5x8.h,v 1.7 2020/07/20 13:41:16 fcambus Exp $ */
+/*	$NetBSD: spleen5x8.h,v 1.8 2021/03/12 17:03:06 fcambus Exp $ */
 /*	$OpenBSD: spleen5x8.h,v 1.2 2018/12/02 14:47:23 fcambus Exp $ */
 
 /*
- * Copyright (c) 2018-2020 Frederic Cambus 
+ * Copyright (c) 2018-2021 Frederic Cambus 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -871,14 +871,14 @@ static u_char spleen5x8_data[] = {
 	0x40, 	/* .*.. */
 	0x30, 	/* ..** */
 
-	0x00, 	/*  */
 	0x20, 	/* ..*. */
 	0x20, 	/* ..*. */
 	0x20, 	/* ..*. */
 	0x20, 	/* ..*. */
 	0x20, 	/* ..*. */
 	0x20, 	/* ..*. */
-	0x00, 	/*  */
+	0x20, 	/* ..*. */
+	0x20, 	/* ..*. */
 
 	0xc0, 	/* **.. */
 	0x20, 	/* ..*. */

Index: src/sys/dev/wsfont/spleen6x12.h
diff -u src/sys/dev/wsfont/spleen6x12.h:1.2 src/sys/dev/wsfont/spleen6x12.h:1.3
--- src/sys/dev/wsfont/spleen6x12.h:1.2	Mon Jul 20 13:41:16 2020
+++ src/sys/dev/wsfont/spleen6x12.h	Fri Mar 12 17:03:06 2021
@@ -1,7 +1,7 @@
-/*	$NetBSD: spleen6x12.h,v 1.2 2020/07/20 13:41:16 fcambus Exp $ */
+/*	$NetBSD: spleen6x12.h,v 1.3 2021/03/12 17:03:06 fcambus Exp $ */
 
 /*
- * Copyright (c) 2018-2020 Frederic Cambus 
+ * Copyright (c) 2018-2021 Frederic Cambus 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ static u_char spleen6x12_data[];
 struct wsdisplay_font spleen6x12 = {
 	.name		= "Spleen 6x12",
 	.firstchar	= ' ',
-	.numchars	= 128 - ' ',
+	.numchars	= 256 - ' ',
 	.encoding	= WSDISPLAY_FONTENC_ISO,
 	.fontwidth	= 6,
 	.fontheight	= 12,
@@ -146,29 +146,29 @@ static u_char spleen6x12_data[] = {
 	0x00, 	/*  */
 	0x00, 	/*  */
 
-	0x00, 	/*  */
 	0x18, 	/* ...**... */
 	0x20, 	/* ..*. */
 	0x40, 	/* .*.. */
 	0x40, 	/* .*.. */
 	0x40, 	/* .*.. */
 	0x40, 	/* .*.. */
+	0x40, 	/* .*.. */
+	0x40, 	/* .*.. */
 	0x20, 	/* ..*. */
 	0x18, 	/* ...**... */
 	0x00, 	/*  */
 	0x00, 	/*  */
-	0x00, 	/*  */
 
-	0x00, 	/*  */
-	0xc0, 	/* **.. */
-	0x20, 	/* ..*. */
-	0x10, 	/* ...* */
-	0x10, 	/* ...* */
+	0x60, 	/* .**. */
 	0x10, 	/* ...* */
+	0x08, 	/* *... */
+	0x08, 	/* *... */
+	0x08, 	/* *... */
+	0x08, 	/* *... */
+	0x08, 	/* *... */
+	0x08, 	/* *... */
 	0x10, 	/* ...* */
-	0x20, 	/* ..*. */
-	0xc0, 	/* **.. */
-	0x00, 	/*  */
+	0x60, 	/* .**. */
 	0x00, 	/*  */
 	0x00, 	/*  */
 
@@ -237,7 +237,6 @@ static u_char spleen6x12_data[] = {
 	0x00, 	/*  */
 	0x00, 	/*  */
 
-	0x00, 	/*  */
 	0x08, 	/* *... */
 	0x08, 	/* *... */
 	0x10, 	/* ...* */
@@ -249,6 +248,7 @@ static u_char spleen6x12_data[] = {
 	0x80, 	/* *... */
 	0x80, 	/* *... */
 	0x00, 	/*  */
+	0x00, 	/*  */
 
 	0x00, 	/*  */
 	0x70, 	/* .*** */
@@ -809,7 +809,6 @@ static u_char spleen6x12_data[] = {
 	0x00, 	/*  */
 	0x00, 	/*  */
 
-	0x00, 	/*  */
 	0x78, 	/* .... */
 	0x40, 	/* .*.. */
 	0x40, 	/* .*.. */
@@ -817,12 +816,12 @@ static u_char spleen6x12_data[] = {
 	0x40, 	/* .*.. */
 	0x40, 	/* .*.. */
 	0x40, 	/* .*.. */
+	0x40, 	/* .*.. */
+	0x40, 	/* .*.. */
 	0x78, 	/* .... */
 	0x00, 	/*  */
 	0x00, 	/*  */
-	0x00, 	/*  */
 
-	0x00, 	/*  */
 	0x80, 	/* *... */
 	0x80, 	/* *... */
 	0x40, 	/* .*.. */
@@ -834,8 +833,8 @@ static u_char spleen6x12_data[] = {
 	0x08, 	/* *... */
 	0x08, 	/* *... */
 	0x00, 	/*  */
-
 	0x00, 	/*  */
+
 	0x78, 	/* .... */
 	0x08, 	/* *... */
 	0x08, 	/* *... */
@@ -843,10 +842,11 @@ static u_char spleen6x12_data[] = {
 	0x08, 	/* *... */
 	0x08, 	/* *... */
 	0x08, 	/* *... */
+	0x08, 	/* *... */
+	0x08, 	/* *... */
 	0x78, 	/* .... */
 	0x00, 	/*  */
 	0x00, 	/*  */
-	0x00, 	/* 

CVS commit: src/sys/dev/wsfont

2020-11-23 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 23 12:15:39 UTC 2020

Modified Files:
src/sys/dev/wsfont: wsfont.c

Log Message:
Sort spleen also in builtin_fonts[].
No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.70 src/sys/dev/wsfont/wsfont.c:1.71
--- src/sys/dev/wsfont/wsfont.c:1.70	Sat Nov 21 22:59:18 2020
+++ src/sys/dev/wsfont/wsfont.c	Mon Nov 23 12:15:39 2020
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.70 2020/11/21 22:59:18 rin Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.71 2020/11/23 12:15:39 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.70 2020/11/21 22:59:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.71 2020/11/23 12:15:39 rin Exp $");
 
 #include "opt_wsfont.h"
 
@@ -288,15 +288,6 @@ static struct font builtin_fonts[] = {
 #ifdef FONT_GO_MONO12x23
 	{ { NULL, NULL }, _Mono_12x23, 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
 #endif
-#ifdef FONT_SPLEEN12x24
-	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
-#endif
-#ifdef FONT_SPLEEN16x32
-	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
-#endif
-#ifdef FONT_SPLEEN32x64
-	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
-#endif
 #ifdef FONT_SPLEEN5x8
 	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
 #endif
@@ -306,6 +297,15 @@ static struct font builtin_fonts[] = {
 #ifdef FONT_SPLEEN8x16
 	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
 #endif
+#ifdef FONT_SPLEEN12x24
+	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
+#endif
+#ifdef FONT_SPLEEN16x32
+	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
+#endif
+#ifdef FONT_SPLEEN32x64
+	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
+#endif
 #ifdef FONT_LIBERATION_MONO12x21
 	{ { NULL, NULL }, _Mono_12x21, 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
 #endif



CVS commit: src/sys/dev/wsfont

2020-11-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 21 23:00:02 UTC 2020

Modified Files:
src/sys/dev/wsfont: files.wsfont

Log Message:
Add missing FONT_SPLEEN6x12 option.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/wsfont/files.wsfont

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/files.wsfont
diff -u src/sys/dev/wsfont/files.wsfont:1.27 src/sys/dev/wsfont/files.wsfont:1.28
--- src/sys/dev/wsfont/files.wsfont:1.27	Sat Nov 21 22:59:18 2020
+++ src/sys/dev/wsfont/files.wsfont	Sat Nov 21 23:00:02 2020
@@ -1,4 +1,4 @@
-# 	$NetBSD: files.wsfont,v 1.27 2020/11/21 22:59:18 rin Exp $
+# 	$NetBSD: files.wsfont,v 1.28 2020/11/21 23:00:02 rin Exp $
 
 defpseudo wsfont
 
@@ -30,6 +30,7 @@ defflag	opt_wsfont.h		FONT_BOLD8x16
 FONT_DROID_SANS_MONO19x36
 FONT_GO_MONO12x23
 FONT_SPLEEN5x8
+FONT_SPLEEN6x12
 FONT_SPLEEN8x16
 FONT_SPLEEN12x24
 FONT_SPLEEN16x32



CVS commit: src/sys/dev/wsfont

2020-11-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 21 22:59:19 UTC 2020

Modified Files:
src/sys/dev/wsfont: files.wsfont wsfont.c

Log Message:
Sort spleen by size, instead of character code.
No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/wsfont/files.wsfont
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/files.wsfont
diff -u src/sys/dev/wsfont/files.wsfont:1.26 src/sys/dev/wsfont/files.wsfont:1.27
--- src/sys/dev/wsfont/files.wsfont:1.26	Fri Nov 13 01:03:39 2020
+++ src/sys/dev/wsfont/files.wsfont	Sat Nov 21 22:59:18 2020
@@ -1,4 +1,4 @@
-# 	$NetBSD: files.wsfont,v 1.26 2020/11/13 01:03:39 macallan Exp $
+# 	$NetBSD: files.wsfont,v 1.27 2020/11/21 22:59:18 rin Exp $
 
 defpseudo wsfont
 
@@ -29,11 +29,11 @@ defflag	opt_wsfont.h		FONT_BOLD8x16
 FONT_DROID_SANS_MONO9x18
 FONT_DROID_SANS_MONO19x36
 FONT_GO_MONO12x23
+FONT_SPLEEN5x8
+FONT_SPLEEN8x16
 FONT_SPLEEN12x24
 FONT_SPLEEN16x32
 FONT_SPLEEN32x64
-FONT_SPLEEN5x8
-FONT_SPLEEN8x16
 FONT_LIBERATION_MONO12x21
 
 file	dev/wsfont/wsfontdev.c	wsfont needs-flag

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.69 src/sys/dev/wsfont/wsfont.c:1.70
--- src/sys/dev/wsfont/wsfont.c:1.69	Fri Nov 13 01:03:39 2020
+++ src/sys/dev/wsfont/wsfont.c	Sat Nov 21 22:59:18 2020
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.69 2020/11/13 01:03:39 macallan Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.70 2020/11/21 22:59:18 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.69 2020/11/13 01:03:39 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.70 2020/11/21 22:59:18 rin Exp $");
 
 #include "opt_wsfont.h"
 
@@ -150,34 +150,34 @@ __KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1
 #include 
 #endif
 
-#ifdef FONT_SPLEEN12x24
+#ifdef FONT_SPLEEN5x8
 #define HAVE_FONT 1
-#include 
+#include 
 #endif
 
-#ifdef FONT_SPLEEN16x32
+#ifdef FONT_SPLEEN6x12
 #define HAVE_FONT 1
-#include 
+#include 
 #endif
 
-#ifdef FONT_SPLEEN32x64
+#ifdef FONT_SPLEEN8x16
 #define HAVE_FONT 1
-#include 
+#include 
 #endif
 
-#ifdef FONT_SPLEEN5x8
+#ifdef FONT_SPLEEN12x24
 #define HAVE_FONT 1
-#include 
+#include 
 #endif
 
-#ifdef FONT_SPLEEN6x12
+#ifdef FONT_SPLEEN16x32
 #define HAVE_FONT 1
-#include 
+#include 
 #endif
 
-#ifdef FONT_SPLEEN8x16
+#ifdef FONT_SPLEEN32x64
 #define HAVE_FONT 1
-#include 
+#include 
 #endif
 
 #ifdef FONT_LIBERATION_MONO12x21



CVS commit: src/sys/dev/wsfont

2020-07-31 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Fri Jul 31 20:39:50 UTC 2020

Modified Files:
src/sys/dev/wsfont: spleen16x32.h spleen32x64.h spleen8x16.h

Log Message:
Update Spleen kernel fonts to version 1.8.2, bringing the following
improvements:

- Fix size of the lower case 'ae' character in the 16x32 and 32x64 versions
- Shorten parentheses, square brackets, braces, slash, backslash in the
  8x16 version, fixing alignment issues
- Shift vertical line and double vertical line characters one pixel
  up in the 8x16 version


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/wsfont/spleen16x32.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/wsfont/spleen32x64.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/wsfont/spleen8x16.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/spleen16x32.h
diff -u src/sys/dev/wsfont/spleen16x32.h:1.6 src/sys/dev/wsfont/spleen16x32.h:1.7
--- src/sys/dev/wsfont/spleen16x32.h:1.6	Mon Jul 20 13:41:16 2020
+++ src/sys/dev/wsfont/spleen16x32.h	Fri Jul 31 20:39:50 2020
@@ -1,8 +1,8 @@
-/*	$NetBSD: spleen16x32.h,v 1.6 2020/07/20 13:41:16 fcambus Exp $ */
+/*	$NetBSD: spleen16x32.h,v 1.7 2020/07/31 20:39:50 fcambus Exp $ */
 /*	$OpenBSD: spleen16x32.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
- * Copyright (c) 2018-2019 Frederic Cambus 
+ * Copyright (c) 2018-2020 Frederic Cambus 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -6589,20 +6589,20 @@ static u_char spleen16x32_data[] = {
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
-	0x1f, 0x3f, 	/* ...*..** */
-	0x1f, 0xff, 	/* ...* */
-	0x01, 0xe3, 	/* ......** */
-	0x00, 0xc3, 	/* **** */
-	0x00, 0xc3, 	/* **** */
-	0x0f, 0xc3, 	/* **** */
-	0x1f, 0xff, 	/* ...* */
-	0x38, 0xff, 	/* ..***... */
-	0x30, 0xc0, 	/* ..****.. */
-	0x30, 0xc0, 	/* ..****.. */
-	0x30, 0xc0, 	/* ..****.. */
-	0x39, 0xe0, 	/* ..***... */
-	0x1f, 0xff, 	/* ...* */
-	0x0f, 0x3f, 	/* ..** */
+	0x1e, 0x7c, 	/* .....*.. */
+	0x1f, 0xfc, 	/* ...***.. */
+	0x03, 0xcc, 	/* ....**.. */
+	0x01, 0x8c, 	/* ...**...**.. */
+	0x01, 0x8c, 	/* ...**...**.. */
+	0x0f, 0x8c, 	/* *...**.. */
+	0x1f, 0xfc, 	/* ...***.. */
+	0x39, 0xfc, 	/* ..***..***.. */
+	0x31, 0x80, 	/* ..**...**... */
+	0x31, 0x80, 	/* ..**...**... */
+	0x31, 0x80, 	/* ..**...**... */
+	0x39, 0xc0, 	/* ..***..***.. */
+	0x1f, 0xfc, 	/* ...***.. */
+	0x0f, 0x7c, 	/* .*.. */
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */

Index: src/sys/dev/wsfont/spleen32x64.h
diff -u src/sys/dev/wsfont/spleen32x64.h:1.7 src/sys/dev/wsfont/spleen32x64.h:1.8
--- src/sys/dev/wsfont/spleen32x64.h:1.7	Mon Jul 20 13:41:16 2020
+++ src/sys/dev/wsfont/spleen32x64.h	Fri Jul 31 20:39:50 2020
@@ -1,8 +1,8 @@
-/*	$NetBSD: spleen32x64.h,v 1.7 2020/07/20 13:41:16 fcambus Exp $ */
+/*	$NetBSD: spleen32x64.h,v 1.8 2020/07/31 20:39:50 fcambus Exp $ */
 /*	$OpenBSD: spleen32x64.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
- * Copyright (c) 2018-2019 Frederic Cambus 
+ * Copyright (c) 2018-2020 Frederic Cambus 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -12937,34 +12937,34 @@ static u_char spleen32x64_data[] = {
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
-	0x03, 0xff, 0x0f, 0xff, 	/* ..** */
-	0x03, 0xff, 0x9f, 0xff, 	/* ..***..* */
-	0x03, 0xff, 0xff, 0xff, 	/* ..** */
-	0x03, 0xff, 0xff, 0xff, 	/* ..** */
-	0x00, 0x03, 0xfc, 0x0f, 	/* .... */
-	0x00, 0x01, 0xf8, 0x0f, 	/* ...**... */
-	0x00, 0x00, 0xf0, 0x0f, 	/*  */
-	0x00, 0x00, 0xf0, 0x0f, 	/*  */
-	0x00, 0x00, 0xf0, 0x0f, 	/*  */
-	0x00, 0x00, 0xf0, 0x0f, 	/*  */
-	0x00, 0x7f, 0xf0, 0x0f, 	/* .*** */
-	0x01, 0xff, 0xf0, 0x0f, 	/* ...* */
-	0x03, 0xff, 0xff, 0xff, 	/* ..** */
-	0x07, 0xff, 0xff, 0xff, 	/* .*** */
-	0x07, 0xc0, 0xff, 0xff, 	/* .*.. */
-	0x0f, 0x80, 0xff, 0xff, 	/* *... */
-	0x0f, 0x00, 0xf0, 0x00, 	/*  */
-	0x0f, 0x00, 0xf0, 

CVS commit: src/sys/dev/wsfont

2020-07-20 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Mon Jul 20 13:41:16 UTC 2020

Modified Files:
src/sys/dev/wsfont: spleen12x24.h spleen16x32.h spleen32x64.h
spleen5x8.h spleen6x12.h spleen8x16.h

Log Message:
Update Spleen kernel fonts to version 1.8.1, bringing the following
improvements:

- Center tilde vertically for all sizes, as modern fonts do


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/wsfont/spleen12x24.h \
src/sys/dev/wsfont/spleen32x64.h src/sys/dev/wsfont/spleen5x8.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/wsfont/spleen16x32.h
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/wsfont/spleen6x12.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/wsfont/spleen8x16.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/spleen12x24.h
diff -u src/sys/dev/wsfont/spleen12x24.h:1.6 src/sys/dev/wsfont/spleen12x24.h:1.7
--- src/sys/dev/wsfont/spleen12x24.h:1.6	Mon Jul  6 20:19:14 2020
+++ src/sys/dev/wsfont/spleen12x24.h	Mon Jul 20 13:41:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen12x24.h,v 1.6 2020/07/06 20:19:14 fcambus Exp $ */
+/*	$NetBSD: spleen12x24.h,v 1.7 2020/07/20 13:41:16 fcambus Exp $ */
 /*	$OpenBSD: spleen12x24.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
@@ -2396,10 +2396,6 @@ static u_char spleen12x24_data[] = {
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
-	0x38, 0x60, 	/* ..*****. */
-	0x6c, 0x60, 	/* .**.**...**. */
-	0xc6, 0xc0, 	/* **...**.**.. */
-	0xc3, 0x80, 	/* *****... */
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
@@ -2407,6 +2403,10 @@ static u_char spleen12x24_data[] = {
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
+	0x38, 0x60, 	/* ..*****. */
+	0x6c, 0x60, 	/* .**.**...**. */
+	0xc6, 0xc0, 	/* **...**.**.. */
+	0xc3, 0x80, 	/* *****... */
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
 	0x00, 0x00, 	/*  */
Index: src/sys/dev/wsfont/spleen32x64.h
diff -u src/sys/dev/wsfont/spleen32x64.h:1.6 src/sys/dev/wsfont/spleen32x64.h:1.7
--- src/sys/dev/wsfont/spleen32x64.h:1.6	Mon Jul  6 20:19:14 2020
+++ src/sys/dev/wsfont/spleen32x64.h	Mon Jul 20 13:41:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen32x64.h,v 1.6 2020/07/06 20:19:14 fcambus Exp $ */
+/*	$NetBSD: spleen32x64.h,v 1.7 2020/07/20 13:41:16 fcambus Exp $ */
 /*	$OpenBSD: spleen32x64.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
@@ -6161,16 +6161,6 @@ static u_char spleen32x64_data[] = {
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
-	0x00, 0x78, 0x00, 0xf0, 	/* .... */
-	0x01, 0xfe, 0x00, 0xf0, 	/* .... */
-	0x03, 0xff, 0x00, 0xf0, 	/* ..** */
-	0x07, 0xff, 0x80, 0xf0, 	/* .... */
-	0x0f, 0xcf, 0xc1, 0xf0, 	/* **..**.* */
-	0x0f, 0x87, 0xe3, 0xf0, 	/* ***...** */
-	0x0f, 0x03, 0xff, 0xe0, 	/* ..*. */
-	0x0f, 0x01, 0xff, 0xc0, 	/* ...***.. */
-	0x0f, 0x00, 0xff, 0x80, 	/* *... */
-	0x0f, 0x00, 0x3e, 0x00, 	/* ..*. */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
@@ -6191,6 +6181,16 @@ static u_char spleen32x64_data[] = {
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
+	0x00, 0x78, 0x00, 0xf0, 	/* .... */
+	0x01, 0xfe, 0x00, 0xf0, 	/* .... */
+	0x03, 0xff, 0x00, 0xf0, 	/* ..** */
+	0x07, 0xff, 0x80, 0xf0, 	/* .... */
+	0x0f, 0xcf, 0xc1, 0xf0, 	/* **..**.* */
+	0x0f, 0x87, 0xe3, 0xf0, 	/* ***...** */
+	0x0f, 0x03, 0xff, 0xe0, 	/* ..*. */
+	0x0f, 0x01, 0xff, 0xc0, 	/* ...***.. */
+	0x0f, 0x00, 0xff, 0x80, 	/* *... */
+	0x0f, 0x00, 0x3e, 0x00, 	/* ..*. */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
 	0x00, 0x00, 0x00, 0x00, 	/*  */
Index: src/sys/dev/wsfont/spleen5x8.h
diff -u 

CVS commit: src/sys/dev/wsfont

2020-07-08 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Wed Jul  8 12:14:19 UTC 2020

Modified Files:
src/sys/dev/wsfont: wsfont.c
Added Files:
src/sys/dev/wsfont: spleen6x12.h

Log Message:
Add "Spleen 6x12" to wsfont, a font targetted at OLED displays.

It contains all printable ASCII characters (96 glyphes).

The font is 2-Clause BSD licensed and is my original creation.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/wsfont/spleen6x12.h
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.67 src/sys/dev/wsfont/wsfont.c:1.68
--- src/sys/dev/wsfont/wsfont.c:1.67	Thu Mar  5 18:20:38 2020
+++ src/sys/dev/wsfont/wsfont.c	Wed Jul  8 12:14:19 2020
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.67 2020/03/05 18:20:38 fcambus Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.68 2020/07/08 12:14:19 fcambus Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.67 2020/03/05 18:20:38 fcambus Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.68 2020/07/08 12:14:19 fcambus Exp $");
 
 #include "opt_wsfont.h"
 
@@ -170,6 +170,11 @@ __KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1
 #include 
 #endif
 
+#ifdef FONT_SPLEEN6x12
+#define HAVE_FONT 1
+#include 
+#endif
+
 #ifdef FONT_SPLEEN8x16
 #define HAVE_FONT 1
 #include 
@@ -290,6 +295,9 @@ static struct font builtin_fonts[] = {
 #ifdef FONT_SPLEEN5x8
 	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
 #endif
+#ifdef FONT_SPLEEN6x12
+	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
+#endif
 #ifdef FONT_SPLEEN8x16
 	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
 #endif

Added files:

Index: src/sys/dev/wsfont/spleen6x12.h
diff -u /dev/null src/sys/dev/wsfont/spleen6x12.h:1.1
--- /dev/null	Wed Jul  8 12:14:19 2020
+++ src/sys/dev/wsfont/spleen6x12.h	Wed Jul  8 12:14:19 2020
@@ -0,0 +1,1292 @@
+/*	$NetBSD: spleen6x12.h,v 1.1 2020/07/08 12:14:19 fcambus Exp $ */
+
+/*
+ * Copyright (c) 2018-2020 Frederic Cambus 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+static u_char spleen6x12_data[];
+
+struct wsdisplay_font spleen6x12 = {
+	.name		= "Spleen 6x12",
+	.firstchar	= ' ',
+	.numchars	= 128 - ' ',
+	.encoding	= WSDISPLAY_FONTENC_ISO,
+	.fontwidth	= 6,
+	.fontheight	= 12,
+	.stride		= 1,
+	.bitorder	= WSDISPLAY_FONTORDER_L2R,
+	.byteorder	= WSDISPLAY_FONTORDER_L2R,
+	.data		= spleen6x12_data
+};
+
+static u_char spleen6x12_data[] = {
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+
+	0x00, 	/*  */
+	0x20, 	/* ..*. */
+	0x20, 	/* ..*. */
+	0x20, 	/* ..*. */
+	0x20, 	/* ..*. */
+	0x20, 	/* ..*. */
+	0x20, 	/* ..*. */
+	0x00, 	/*  */
+	0x20, 	/* ..*. */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+
+	0x00, 	/*  */
+	0x50, 	/* .*.* */
+	0x50, 	/* .*.* */
+	0x50, 	/* .*.* */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x00, 	/*  */
+
+	0x00, 	/*  */
+	0x00, 	/*  */
+	0x50, 	/* .*.* */
+	0xf8, 	/* *... */
+	0x50, 	/* .*.* */
+	0x50, 	/* .*.* */
+	0x50, 	

CVS commit: src/sys/dev/wsfont

2020-07-06 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Mon Jul  6 20:19:14 UTC 2020

Modified Files:
src/sys/dev/wsfont: spleen12x24.h spleen16x32.h spleen32x64.h
spleen5x8.h spleen8x16.h

Log Message:
Use C99 initializers in wsdisplay_font struct definitions for
Spleen kernel fonts.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/wsfont/spleen12x24.h \
src/sys/dev/wsfont/spleen32x64.h src/sys/dev/wsfont/spleen5x8.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/wsfont/spleen16x32.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/wsfont/spleen8x16.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/spleen12x24.h
diff -u src/sys/dev/wsfont/spleen12x24.h:1.5 src/sys/dev/wsfont/spleen12x24.h:1.6
--- src/sys/dev/wsfont/spleen12x24.h:1.5	Sun Jun 21 15:48:17 2020
+++ src/sys/dev/wsfont/spleen12x24.h	Mon Jul  6 20:19:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen12x24.h,v 1.5 2020/06/21 15:48:17 fcambus Exp $ */
+/*	$NetBSD: spleen12x24.h,v 1.6 2020/07/06 20:19:14 fcambus Exp $ */
 /*	$OpenBSD: spleen12x24.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
@@ -30,16 +30,16 @@
 static u_char spleen12x24_data[];
 
 struct wsdisplay_font spleen12x24 = {
-	"Spleen 12x24",			/* typeface name */
-	' ',/* firstchar */
-	256 - ' ',			/* numchars */
-	WSDISPLAY_FONTENC_ISO,		/* encoding */
-	12,/* width */
-	24,/* height */
-	2,/* stride */
-	WSDISPLAY_FONTORDER_L2R,	/* bit order */
-	WSDISPLAY_FONTORDER_L2R,	/* byte order */
-	spleen12x24_data		/* data */
+	.name		= "Spleen 12x24",
+	.firstchar	= ' ',
+	.numchars	= 256 - ' ',
+	.encoding	= WSDISPLAY_FONTENC_ISO,
+	.fontwidth	= 12,
+	.fontheight	= 24,
+	.stride		= 2,
+	.bitorder	= WSDISPLAY_FONTORDER_L2R,
+	.byteorder	= WSDISPLAY_FONTORDER_L2R,
+	.data		= spleen12x24_data
 };
 
 static u_char spleen12x24_data[] = {
Index: src/sys/dev/wsfont/spleen32x64.h
diff -u src/sys/dev/wsfont/spleen32x64.h:1.5 src/sys/dev/wsfont/spleen32x64.h:1.6
--- src/sys/dev/wsfont/spleen32x64.h:1.5	Sun Jun 21 15:48:17 2020
+++ src/sys/dev/wsfont/spleen32x64.h	Mon Jul  6 20:19:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen32x64.h,v 1.5 2020/06/21 15:48:17 fcambus Exp $ */
+/*	$NetBSD: spleen32x64.h,v 1.6 2020/07/06 20:19:14 fcambus Exp $ */
 /*	$OpenBSD: spleen32x64.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
@@ -30,16 +30,16 @@
 static u_char spleen32x64_data[];
 
 struct wsdisplay_font spleen32x64 = {
-	"Spleen 32x64",			/* typeface name */
-	' ',/* firstchar */
-	256 - ' ',			/* numchars */
-	WSDISPLAY_FONTENC_ISO,		/* encoding */
-	32,/* width */
-	64,/* height */
-	4,/* stride */
-	WSDISPLAY_FONTORDER_L2R,	/* bit order */
-	WSDISPLAY_FONTORDER_L2R,	/* byte order */
-	spleen32x64_data		/* data */
+	.name		= "Spleen 32x64",
+	.firstchar	= ' ',
+	.numchars	= 256 - ' ',
+	.encoding	= WSDISPLAY_FONTENC_ISO,
+	.fontwidth	= 32,
+	.fontheight	= 64,
+	.stride		= 4,
+	.bitorder	= WSDISPLAY_FONTORDER_L2R,
+	.byteorder	= WSDISPLAY_FONTORDER_L2R,
+	.data		= spleen32x64_data
 };
 
 static u_char spleen32x64_data[] = {
Index: src/sys/dev/wsfont/spleen5x8.h
diff -u src/sys/dev/wsfont/spleen5x8.h:1.5 src/sys/dev/wsfont/spleen5x8.h:1.6
--- src/sys/dev/wsfont/spleen5x8.h:1.5	Mon Jun 29 09:45:35 2020
+++ src/sys/dev/wsfont/spleen5x8.h	Mon Jul  6 20:19:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen5x8.h,v 1.5 2020/06/29 09:45:35 fcambus Exp $ */
+/*	$NetBSD: spleen5x8.h,v 1.6 2020/07/06 20:19:14 fcambus Exp $ */
 /*	$OpenBSD: spleen5x8.h,v 1.2 2018/12/02 14:47:23 fcambus Exp $ */
 
 /*
@@ -30,16 +30,16 @@
 static u_char spleen5x8_data[];
 
 struct wsdisplay_font spleen5x8 = {
-	"Spleen 5x8",			/* typeface name */
-	' ',/* firstchar */
-	128 - ' ',			/* numchars */
-	WSDISPLAY_FONTENC_ISO,		/* encoding */
-	5,/* width */
-	8,/* height */
-	1,/* stride */
-	WSDISPLAY_FONTORDER_L2R,	/* bit order */
-	WSDISPLAY_FONTORDER_L2R,	/* byte order */
-	spleen5x8_data			/* data */
+	.name		= "Spleen 5x8",
+	.firstchar	= ' ',
+	.numchars	= 128 - ' ',
+	.encoding	= WSDISPLAY_FONTENC_ISO,
+	.fontwidth	= 5,
+	.fontheight	= 8,
+	.stride		= 1,
+	.bitorder	= WSDISPLAY_FONTORDER_L2R,
+	.byteorder	= WSDISPLAY_FONTORDER_L2R,
+	.data		= spleen5x8_data
 };
 
 static u_char spleen5x8_data[] = {

Index: src/sys/dev/wsfont/spleen16x32.h
diff -u src/sys/dev/wsfont/spleen16x32.h:1.4 src/sys/dev/wsfont/spleen16x32.h:1.5
--- src/sys/dev/wsfont/spleen16x32.h:1.4	Sun Jun 21 15:48:17 2020
+++ src/sys/dev/wsfont/spleen16x32.h	Mon Jul  6 20:19:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen16x32.h,v 1.4 2020/06/21 15:48:17 fcambus Exp $ */
+/*	$NetBSD: spleen16x32.h,v 1.5 2020/07/06 20:19:14 fcambus Exp $ */
 /*	$OpenBSD: spleen16x32.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
@@ -30,16 +30,16 @@
 static u_char spleen16x32_data[];
 
 struct wsdisplay_font spleen16x32 = {
-	"Spleen 16x32",			/* typeface name */
-	' ',/* firstchar */
-	256 - ' ',			/* numchars 

CVS commit: src/sys/dev/wsfont

2020-06-29 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Mon Jun 29 09:45:35 UTC 2020

Modified Files:
src/sys/dev/wsfont: spleen5x8.h

Log Message:
Update Spleen kernel fonts to version 1.8.0, bringing the following
improvements:

- Improve ampersand character, making it more consistent with other
  sizes (5x8 version)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/wsfont/spleen5x8.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/spleen5x8.h
diff -u src/sys/dev/wsfont/spleen5x8.h:1.4 src/sys/dev/wsfont/spleen5x8.h:1.5
--- src/sys/dev/wsfont/spleen5x8.h:1.4	Sun Jun 21 15:48:17 2020
+++ src/sys/dev/wsfont/spleen5x8.h	Mon Jun 29 09:45:35 2020
@@ -1,8 +1,8 @@
-/*	$NetBSD: spleen5x8.h,v 1.4 2020/06/21 15:48:17 fcambus Exp $ */
+/*	$NetBSD: spleen5x8.h,v 1.5 2020/06/29 09:45:35 fcambus Exp $ */
 /*	$OpenBSD: spleen5x8.h,v 1.2 2018/12/02 14:47:23 fcambus Exp $ */
 
 /*
- * Copyright (c) 2018-2019 Frederic Cambus 
+ * Copyright (c) 2018-2020 Frederic Cambus 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -101,7 +101,7 @@ static u_char spleen5x8_data[] = {
 	0x50, 	/* .*.* */
 	0x50, 	/* .*.* */
 	0x60, 	/* .**. */
-	0xa0, 	/* *.*. */
+	0xa8, 	/* *.*.*... */
 	0x90, 	/* *..* */
 	0x68, 	/* .**.*... */
 	0x00, 	/*  */



CVS commit: src/sys/dev/wsfont

2020-06-21 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Sun Jun 21 15:48:17 UTC 2020

Modified Files:
src/sys/dev/wsfont: spleen12x24.h spleen16x32.h spleen32x64.h
spleen5x8.h spleen8x16.h

Log Message:
Update Spleen kernel fonts to version 1.7.1, bringing the following
improvements:

- Remove strain pixel on the '5' digit (5x8 version)
- Improve the Esszet character (8x16, 12x24, 16x32, and 32x64 versions)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/wsfont/spleen12x24.h \
src/sys/dev/wsfont/spleen32x64.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/wsfont/spleen16x32.h \
src/sys/dev/wsfont/spleen5x8.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/wsfont/spleen8x16.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/spleen12x24.h
diff -u src/sys/dev/wsfont/spleen12x24.h:1.4 src/sys/dev/wsfont/spleen12x24.h:1.5
--- src/sys/dev/wsfont/spleen12x24.h:1.4	Mon Nov  4 10:44:00 2019
+++ src/sys/dev/wsfont/spleen12x24.h	Sun Jun 21 15:48:17 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen12x24.h,v 1.4 2019/11/04 10:44:00 fcambus Exp $ */
+/*	$NetBSD: spleen12x24.h,v 1.5 2020/06/21 15:48:17 fcambus Exp $ */
 /*	$OpenBSD: spleen12x24.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
@@ -4829,13 +4829,13 @@ static u_char spleen12x24_data[] = {
 	0x61, 0x80, 	/* .****... */
 	0x61, 0x80, 	/* .****... */
 	0x63, 0x00, 	/* .**...** */
-	0x7f, 0x00, 	/* .*** */
+	0x6f, 0x00, 	/* .**. */
 	0x63, 0x80, 	/* .**...***... */
 	0x60, 0xc0, 	/* .**.**.. */
 	0x60, 0x60, 	/* .**..**. */
 	0x60, 0x60, 	/* .**..**. */
 	0x60, 0x60, 	/* .**..**. */
-	0x78, 0x60, 	/* .**. */
+	0x68, 0x60, 	/* .**.***. */
 	0x6c, 0xc0, 	/* .**.**..**.. */
 	0x67, 0x80, 	/* .**..... */
 	0x00, 0x00, 	/*  */
Index: src/sys/dev/wsfont/spleen32x64.h
diff -u src/sys/dev/wsfont/spleen32x64.h:1.4 src/sys/dev/wsfont/spleen32x64.h:1.5
--- src/sys/dev/wsfont/spleen32x64.h:1.4	Mon Nov  4 10:44:00 2019
+++ src/sys/dev/wsfont/spleen32x64.h	Sun Jun 21 15:48:17 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen32x64.h,v 1.4 2019/11/04 10:44:00 fcambus Exp $ */
+/*	$NetBSD: spleen32x64.h,v 1.5 2020/06/21 15:48:17 fcambus Exp $ */
 /*	$OpenBSD: spleen32x64.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
@@ -12485,31 +12485,31 @@ static u_char spleen32x64_data[] = {
 	0x0f, 0x00, 0x0f, 0x00, 	/*  */
 	0x0f, 0x00, 0x0f, 0x00, 	/*  */
 	0x0f, 0x00, 0x1f, 0x00, 	/* ...* */
-	0x0f, 0x00, 0x3f, 0x00, 	/* ..** */
-	0x0f, 0xff, 0xfe, 0x00, 	/* ***. */
-	0x0f, 0xff, 0xfc, 0x00, 	/* **.. */
-	0x0f, 0xff, 0xf8, 0x00, 	/* *... */
-	0x0f, 0xff, 0xf0, 0x00, 	/*  */
-	0x0f, 0x03, 0xfc, 0x00, 	/* .... */
-	0x0f, 0x00, 0xff, 0x00, 	/*  */
-	0x0f, 0x00, 0x3f, 0xc0, 	/* .... */
+	0x0f, 0x00, 0x1f, 0x00, 	/* ...* */
+	0x0f, 0x00, 0x3e, 0x00, 	/* ..*. */
+	0x0f, 0x00, 0xfe, 0x00, 	/* ***. */
+	0x0f, 0x0f, 0xfc, 0x00, 	/* **.. */
+	0x0f, 0x0f, 0xff, 0x00, 	/*  */
+	0x0f, 0x0f, 0xff, 0x80, 	/* *... */
+	0x0f, 0x0f, 0xff, 0xc0, 	/* **.. */
 	0x0f, 0x00, 0x0f, 0xe0, 	/* ***. */
-	0x0f, 0x00, 0x03, 0xf0, 	/* ..** */
+	0x0f, 0x00, 0x03, 0xe0, 	/* ..*. */
+	0x0f, 0x00, 0x01, 0xf0, 	/* ...* */
 	0x0f, 0x00, 0x01, 0xf0, 	/* ...* */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
-	0x0f, 0x80, 0x00, 0xf0, 	/* *... */
-	0x0f, 0xc0, 0x00, 0xf0, 	/* **.. */
-	0x0f, 0xe0, 0x00, 0xf0, 	/* ***. */
-	0x0f, 0xf0, 0x01, 0xf0, 	/* ...* */
-	0x0f, 0xfc, 0x03, 0xe0, 	/* ***. */
-	0x0f, 0x7f, 0xff, 0xe0, 	/* .**. */
-	0x0f, 0x3f, 0xff, 0xc0, 	/* .... */
-	0x0f, 0x1f, 0xff, 0x80, 	/* ...**... */
-	0x0f, 0x0f, 0xfe, 0x00, 	/* ***. */
+	0x0f, 0x00, 0x00, 0xf0, 	/* 

CVS commit: src/sys/dev/wsfont

2020-03-05 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Thu Mar  5 18:20:38 UTC 2020

Modified Files:
src/sys/dev/wsfont: wsfont.c

Log Message:
Remove references to non-existing fonts.

Include files with font data (courier11x18.h and iso8x16.h) were removed
in 1999 due to licensing concerns.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.66 src/sys/dev/wsfont/wsfont.c:1.67
--- src/sys/dev/wsfont/wsfont.c:1.66	Sun Apr  7 13:48:27 2019
+++ src/sys/dev/wsfont/wsfont.c	Thu Mar  5 18:20:38 2020
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.66 2019/04/07 13:48:27 jmcneill Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.67 2020/03/05 18:20:38 fcambus Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.66 2019/04/07 13:48:27 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.67 2020/03/05 18:20:38 fcambus Exp $");
 
 #include "opt_wsfont.h"
 
@@ -218,12 +218,6 @@ static struct font builtin_fonts[] = {
 #ifdef FONT_BOLD16x32
 	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN  },
 #endif
-#ifdef FONT_ISO8x16
-	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
-#endif
-#ifdef FONT_COURIER11x18
-	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
-#endif
 #ifdef FONT_GALLANT12x22
 	{ { NULL, NULL }, , 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
 #endif



CVS commit: src/sys/dev/wsfont

2019-03-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar 17 09:54:06 UTC 2019

Modified Files:
src/sys/dev/wsfont: wsfont.c

Log Message:
Define missing HAVE_FONT for newcomers.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.64 src/sys/dev/wsfont/wsfont.c:1.65
--- src/sys/dev/wsfont/wsfont.c:1.64	Sun Mar 17 06:09:35 2019
+++ src/sys/dev/wsfont/wsfont.c	Sun Mar 17 09:54:06 2019
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.64 2019/03/17 06:09:35 tnn Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.65 2019/03/17 09:54:06 rin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.64 2019/03/17 06:09:35 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.65 2019/03/17 09:54:06 rin Exp $");
 
 #include "opt_wsfont.h"
 
@@ -126,42 +126,52 @@ __KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1
 #endif
 
 #ifdef FONT_DEJAVU_SANS_MONO12x22
+#define HAVE_FONT 1
 #include 
 #endif
 
 #ifdef FONT_DROID_SANS_MONO12x22
+#define HAVE_FONT 1
 #include 
 #endif
 
 #ifdef FONT_DROID_SANS_MONO9x18
+#define HAVE_FONT 1
 #include 
 #endif
 
 #ifdef FONT_DROID_SANS_MONO19x36
+#define HAVE_FONT 1
 #include 
 #endif
 
 #ifdef FONT_GO_MONO12x23
+#define HAVE_FONT 1
 #include 
 #endif
 
 #ifdef FONT_SPLEEN12x24
+#define HAVE_FONT 1
 #include 
 #endif
 
 #ifdef FONT_SPLEEN16x32
+#define HAVE_FONT 1
 #include 
 #endif
 
 #ifdef FONT_SPLEEN32x64
+#define HAVE_FONT 1
 #include 
 #endif
 
 #ifdef FONT_SPLEEN5x8
+#define HAVE_FONT 1
 #include 
 #endif
 
 #ifdef FONT_SPLEEN8x16
+#define HAVE_FONT 1
 #include 
 #endif
 



CVS commit: src/sys/dev/wsfont

2019-03-17 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sun Mar 17 06:09:35 UTC 2019

Modified Files:
src/sys/dev/wsfont: files.wsfont wsfont.c
Added Files:
src/sys/dev/wsfont: spleen12x24.h spleen16x32.h spleen32x64.h
spleen5x8.h spleen8x16.h

Log Message:
import the Spleen wscons fonts from OpenBSD

Spleen is a 2-clause BSD licensed font set designed by Frederic Cambus.
The 5x8 font is designed for low resolution displays, but the font
comes in a variety of sizes suitable for larger display too.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/wsfont/files.wsfont
cvs rdiff -u -r0 -r1.1 src/sys/dev/wsfont/spleen12x24.h \
src/sys/dev/wsfont/spleen16x32.h src/sys/dev/wsfont/spleen32x64.h \
src/sys/dev/wsfont/spleen5x8.h src/sys/dev/wsfont/spleen8x16.h
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffs are larger than 1MB and have been omitted


CVS commit: src/sys/dev/wsfont

2017-11-04 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sat Nov  4 08:33:28 UTC 2017

Modified Files:
src/sys/dev/wsfont: wsfont.c

Log Message:
Don't test for failure of malloc(...,M_WAITOK), it cannot fail


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.61 src/sys/dev/wsfont/wsfont.c:1.62
--- src/sys/dev/wsfont/wsfont.c:1.61	Sun Nov 20 15:55:31 2016
+++ src/sys/dev/wsfont/wsfont.c	Sat Nov  4 08:33:28 2017
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.61 2016/11/20 15:55:31 macallan Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.62 2017/11/04 08:33:28 maya Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.61 2016/11/20 15:55:31 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.62 2017/11/04 08:33:28 maya Exp $");
 
 #include "opt_wsfont.h"
 
@@ -367,8 +367,6 @@ wsfont_rotate_cw_internal(struct wsdispl
 
 	/* Duplicate the existing font... */
 	newfont = malloc(sizeof(*font), M_DEVBUF, M_WAITOK);
-	if (newfont == NULL)
-		return (NULL);
 
 	*newfont = *font;
 
@@ -382,10 +380,6 @@ wsfont_rotate_cw_internal(struct wsdispl
 	newstride = (font->fontheight + 7) / 8;
 	newbits = malloc(newstride * font->fontwidth * font->numchars,
 	M_DEVBUF, M_WAITOK|M_ZERO);
-	if (newbits == NULL) {
-		free(newfont, M_DEVBUF);
-		return (NULL);
-	}
 
 	/* Rotate the font a bit at a time. */
 	for (n = 0; n < font->numchars; n++) {
@@ -438,8 +432,6 @@ wsfont_rotate_ccw_internal(struct wsdisp
 
 	/* Duplicate the existing font... */
 	newfont = malloc(sizeof(*font), M_DEVBUF, M_WAITOK);
-	if (newfont == NULL)
-		return (NULL);
 
 	*newfont = *font;
 
@@ -453,10 +445,6 @@ wsfont_rotate_ccw_internal(struct wsdisp
 	newstride = (font->fontheight + 7) / 8;
 	newbits = malloc(newstride * font->fontwidth * font->numchars,
 	M_DEVBUF, M_WAITOK|M_ZERO);
-	if (newbits == NULL) {
-		free(newfont, M_DEVBUF);
-		return (NULL);
-	}
 
 	/* Rotate the font a bit at a time. */
 	for (n = 0; n < font->numchars; n++) {



CVS commit: src/sys/dev/wsfont

2017-06-22 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Jun 23 01:57:40 UTC 2017

Modified Files:
src/sys/dev/wsfont: wsfontdev.c

Log Message:
allow longer font names


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/wsfont/wsfontdev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfontdev.c
diff -u src/sys/dev/wsfont/wsfontdev.c:1.17 src/sys/dev/wsfont/wsfontdev.c:1.18
--- src/sys/dev/wsfont/wsfontdev.c:1.17	Thu Aug 20 14:40:18 2015
+++ src/sys/dev/wsfont/wsfontdev.c	Fri Jun 23 01:57:40 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: wsfontdev.c,v 1.17 2015/08/20 14:40:18 christos Exp $ */
+/* $NetBSD: wsfontdev.c,v 1.18 2017/06/23 01:57:40 macallan Exp $ */
 
 /*
  * Copyright (c) 2001
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsfontdev.c,v 1.17 2015/08/20 14:40:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfontdev.c,v 1.18 2017/06/23 01:57:40 macallan Exp $");
 
 #include 
 #include 
@@ -74,7 +74,7 @@ static int
 wsfontioctl(dev_t dev, u_long cmd, void *data, int flag,
 struct lwp *l)
 {
-	char nbuf[16];
+	char nbuf[64];
 	void *buf;
 	int res;
 



CVS commit: src/sys/dev/wsfont

2017-05-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 22 19:04:34 UTC 2017

Modified Files:
src/sys/dev/wsfont: files.wsfont

Log Message:
vcons needs fonts now.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/wsfont/files.wsfont

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/files.wsfont
diff -u src/sys/dev/wsfont/files.wsfont:1.22 src/sys/dev/wsfont/files.wsfont:1.23
--- src/sys/dev/wsfont/files.wsfont:1.22	Sun Nov 20 10:55:31 2016
+++ src/sys/dev/wsfont/files.wsfont	Mon May 22 15:04:34 2017
@@ -1,11 +1,11 @@
-# 	$NetBSD: files.wsfont,v 1.22 2016/11/20 15:55:31 macallan Exp $
+# 	$NetBSD: files.wsfont,v 1.23 2017/05/22 19:04:34 christos Exp $
 
 defpseudo wsfont
 
 # Note: `wsfont_glue' is only here to force the header file's name
 #	hence it must be mentioned first  (shudder...)
 file	dev/wsfont/wsfont.c	(wsfont_glue & rasops_rotation) |
-rasterconsole | wsdisplay | wsfont		needs-flag
+rasterconsole | wsdisplay | wsfont | vcons		needs-flag
 
 defflag	opt_wsfont.h		FONT_BOLD8x16
 FONT_GLASS10x19



CVS commit: src/sys/dev/wsfont

2016-11-20 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sun Nov 20 15:44:40 UTC 2016

Modified Files:
src/sys/dev/wsfont: wsfont.c wsfont.h

Log Message:
add WSFONT_PREFER_ALPHA - for drivers that would rather render anti-aliased
fonts


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/wsfont/wsfont.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/wsfont/wsfont.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.59 src/sys/dev/wsfont/wsfont.c:1.60
--- src/sys/dev/wsfont/wsfont.c:1.59	Sat May  9 16:40:37 2015
+++ src/sys/dev/wsfont/wsfont.c	Sun Nov 20 15:44:40 2016
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.59 2015/05/09 16:40:37 mlelstv Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.60 2016/11/20 15:44:40 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.59 2015/05/09 16:40:37 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.60 2016/11/20 15:44:40 macallan Exp $");
 
 #include "opt_wsfont.h"
 
@@ -574,6 +574,8 @@ wsfont_matches(struct wsdisplay_font *fo
 
 	/* first weed out fonts the caller doesn't claim support for */
 	if (FONT_IS_ALPHA(font)) {
+		if (flags & WSFONT_PREFER_ALPHA)
+			score++;
 		if ((flags & WSFONT_FIND_ALPHA) == 0)
 			return 0;
 	} else {

Index: src/sys/dev/wsfont/wsfont.h
diff -u src/sys/dev/wsfont/wsfont.h:1.25 src/sys/dev/wsfont/wsfont.h:1.26
--- src/sys/dev/wsfont/wsfont.h:1.25	Sat Apr 18 11:23:58 2015
+++ src/sys/dev/wsfont/wsfont.h	Sun Nov 20 15:44:40 2016
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.h,v 1.25 2015/04/18 11:23:58 mlelstv Exp $	*/
+/* 	$NetBSD: wsfont.h,v 1.26 2016/11/20 15:44:40 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -66,6 +66,8 @@ int	wsfont_find(const char *, int, int, 
 #define WSFONT_FIND_ALPHA	0x02
 #define WSFONT_FIND_ALL		0xff
 #define WSFONT_FIND_BESTWIDTH	0x1000
+#define WSFONT_PREFER_ALPHA	0x2000
+
 void	wsfont_walk(void (*)(struct wsdisplay_font *, void *, int), void *);
 
 int	wsfont_add(struct wsdisplay_font *, int);



CVS commit: src/sys/dev/wsfont

2015-05-09 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat May  9 16:40:37 UTC 2015

Modified Files:
src/sys/dev/wsfont: wsfont.c

Log Message:
When searching for a best font also allow fonts too wide for the
desired display columns but penalize these against all narrower ones.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.58 src/sys/dev/wsfont/wsfont.c:1.59
--- src/sys/dev/wsfont/wsfont.c:1.58	Sat Apr 18 11:23:58 2015
+++ src/sys/dev/wsfont/wsfont.c	Sat May  9 16:40:37 2015
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.58 2015/04/18 11:23:58 mlelstv Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.59 2015/05/09 16:40:37 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.58 2015/04/18 11:23:58 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.59 2015/05/09 16:40:37 mlelstv Exp $);
 
 #include opt_wsfont.h
 
@@ -570,7 +570,7 @@ int
 wsfont_matches(struct wsdisplay_font *font, const char *name,
 	   int width, int height, int stride, int flags)
 {
-	int score = 1;
+	int score = 2;
 
 	/* first weed out fonts the caller doesn't claim support for */
 	if (FONT_IS_ALPHA(font)) {
@@ -590,8 +590,9 @@ wsfont_matches(struct wsdisplay_font *fo
 return (0);
 		} else {
 			if (font-fontwidth  width)
-return (0);
-			score -= min(width - font-fontwidth, );
+score -= 1 + min(font-fontwidth - width, );
+			else
+score -= min(width - font-fontwidth, );
 		}
 	}
 



CVS commit: src/sys/dev/wsfont

2014-11-05 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Nov  5 17:01:38 UTC 2014

Modified Files:
src/sys/dev/wsfont: files.wsfont wsfont.c
Added Files:
src/sys/dev/wsfont: Droid_Sans_Mono_19x36.h

Log Message:
add FONT_DROID_SANS_MONO19x36, so we have something readable on
200+dpi displays


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/wsfont/Droid_Sans_Mono_19x36.h
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/wsfont/files.wsfont
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffs are larger than 1MB and have been omitted


CVS commit: src/sys/dev/wsfont

2014-11-05 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Nov  5 17:03:40 UTC 2014

Modified Files:
src/sys/dev/wsfont: Droid_Sans_Mono_19x36.h

Log Message:
forgot the license header


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/wsfont/Droid_Sans_Mono_19x36.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/Droid_Sans_Mono_19x36.h
diff -u src/sys/dev/wsfont/Droid_Sans_Mono_19x36.h:1.1 src/sys/dev/wsfont/Droid_Sans_Mono_19x36.h:1.2
--- src/sys/dev/wsfont/Droid_Sans_Mono_19x36.h:1.1	Wed Nov  5 17:01:38 2014
+++ src/sys/dev/wsfont/Droid_Sans_Mono_19x36.h	Wed Nov  5 17:03:40 2014
@@ -1,3 +1,19 @@
+/*
+   Copyright 2010 Ascender Corporation
+
+   Licensed under the Apache License, Version 2.0 (the License);
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an AS IS BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
 static u_char Droid_Sans_Mono_19x36_data[];
 
 static struct wsdisplay_font Droid_Sans_Mono_19x36 = {



CVS commit: src/sys/dev/wsfont

2012-08-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Aug  9 01:41:48 UTC 2012

Modified Files:
src/sys/dev/wsfont: DejaVu_Sans_Mono_12x22.h

Log Message:
remove some stray pixels in the R glyph


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h
diff -u src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h:1.2 src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h:1.3
--- src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h:1.2	Tue May  1 07:46:47 2012
+++ src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h	Thu Aug  9 01:41:47 2012
@@ -2003,8 +2003,8 @@ static u_char DejaVu_Sans_Mono_12x22_dat
 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xf7, 0xfe, 0x31, /*  XX  XX. */
 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0xff, 0xb4, /*  XX  oXa */
 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xf2, 0xff, /*  XX   XX */
-0x39, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xff, /* .XX   oX */
-0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a*/
+0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xff, /*  XX   oX */
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*  */
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*  */
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*  */
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*  */



CVS commit: src/sys/dev/wsfont

2012-05-01 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue May  1 07:46:48 UTC 2012

Modified Files:
src/sys/dev/wsfont: DejaVu_Sans_Mono_12x22.h

Log Message:
add license header


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h
diff -u src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h:1.1 src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h:1.2
--- src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h:1.1	Thu Dec 22 05:01:15 2011
+++ src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h	Tue May  1 07:46:47 2012
@@ -1,3 +1,88 @@
+/*
+ * Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
+ * Bitstream Vera is a trademark of Bitstream, Inc. 
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of the fonts accompanying this license (Fonts) and associated
+ * documentation files (the Font Software), to reproduce and distribute the
+ * Font Software, including without limitation the rights to use, copy, merge,
+ * publish, distribute, and/or sell copies of the Font Software, and to permit
+ * persons to whom the Font Software is furnished to do so, subject to the
+ * following conditions: 
+ *
+ * - The above copyright and trademark notices and this permission notice shall
+ *   be included in all copies of one or more of the Font Software typefaces. 
+ *
+ * - The Font Software may be modified, altered, or added to, and in particular
+ *   the designs of glyphs or characters in the Fonts may be modified and
+ *   additional glyphs or characters may be added to the Fonts, only if the
+ *   fonts are renamed to names not containing either the words Bitstream or
+ *   the word Vera.
+ *
+ * This License becomes null and void to the extent applicable to Fonts or Font
+ * Software that has been modified and is distributed under the Bitstream
+ * Vera names. 
+ *
+ * The Font Software may be sold as part of a larger software package but no
+ * copy of one or more of the Font Software typefaces may be sold by itself. 
+ *
+ * THE FONT SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+ * TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
+ * FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
+ * ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
+ * FONT SOFTWARE. 
+ *
+ * Except as contained in this notice, the names of Gnome, the Gnome
+ * Foundation, and Bitstream Inc., shall not be used in advertising or
+ * otherwise to promote the sale, use or other dealings in this Font Software
+ * without prior written authorization from the Gnome Foundation or
+ * Bitstream Inc., respectively. For further information, contact:
+ * fonts at gnome dot org.
+ *
+ * Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of the fonts accompanying this license (Fonts) and associated
+ * documentation files (the Font Software), to reproduce and distribute the
+ * modifications to the Bitstream Vera Font Software, including without
+ * limitation the rights to use, copy, merge, publish, distribute, and/or sell
+ * copies of the Font Software, and to permit persons to whom the Font Software
+ * is furnished to do so, subject to the following conditions: 
+ *
+ * - The above copyright and trademark notices and this permission notice shall
+ *   be included in all copies of one or more of the Font Software typefaces. 
+ * - The Font Software may be modified, altered, or added to, and in particular
+ *   the designs of glyphs or characters in the Fonts may be modified and
+ *   additional glyphs or characters may be added to the Fonts, only if the
+ *   fonts are renamed to names not containing either the words Tavmjong Bah
+ *   or the word Arev. 
+ *
+ * This License becomes null and void to the extent applicable to Fonts or Font
+ * Software that has been modified and is distributed under the Tavmjong Bah
+ * Arev names. 
+ *
+ * The Font Software may be sold as part of a larger software package but no
+ * copy of one or more of the Font Software typefaces may be sold by itself. 
+ *
+ * THE FONT SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+ * TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL TAVMJONG BAH BE LIABLE FOR ANY
+ * 

CVS commit: src/sys/dev/wsfont

2012-04-10 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Apr 10 16:16:03 UTC 2012

Modified Files:
src/sys/dev/wsfont: Droid_Sans_Mono_12x22.h Droid_Sans_Mono_9x18.h

Log Message:
add license headers
I need to find a way to extract at least the copyright notice from the .ttf
file so ttf2wsfont can do this mostly automatically.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/wsfont/Droid_Sans_Mono_12x22.h \
src/sys/dev/wsfont/Droid_Sans_Mono_9x18.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/Droid_Sans_Mono_12x22.h
diff -u src/sys/dev/wsfont/Droid_Sans_Mono_12x22.h:1.1 src/sys/dev/wsfont/Droid_Sans_Mono_12x22.h:1.2
--- src/sys/dev/wsfont/Droid_Sans_Mono_12x22.h:1.1	Thu Dec 22 05:01:15 2011
+++ src/sys/dev/wsfont/Droid_Sans_Mono_12x22.h	Tue Apr 10 16:16:03 2012
@@ -1,3 +1,19 @@
+/*
+   Copyright 2010 Ascender Corporation
+
+   Licensed under the Apache License, Version 2.0 (the License);
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an AS IS BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
 static u_char Droid_Sans_Mono_12x22_data[];
 
 static struct wsdisplay_font Droid_Sans_Mono_12x22 = {
Index: src/sys/dev/wsfont/Droid_Sans_Mono_9x18.h
diff -u src/sys/dev/wsfont/Droid_Sans_Mono_9x18.h:1.1 src/sys/dev/wsfont/Droid_Sans_Mono_9x18.h:1.2
--- src/sys/dev/wsfont/Droid_Sans_Mono_9x18.h:1.1	Wed Dec 28 18:29:48 2011
+++ src/sys/dev/wsfont/Droid_Sans_Mono_9x18.h	Tue Apr 10 16:16:03 2012
@@ -1,3 +1,19 @@
+/*
+   Copyright 2010 Ascender Corporation
+
+   Licensed under the Apache License, Version 2.0 (the License);
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an AS IS BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
 static u_char Droid_Sans_Mono_9x18_data[];
 
 static struct wsdisplay_font Droid_Sans_Mono_9x18 = {



CVS commit: src/sys/dev/wsfont

2012-04-04 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Apr  5 02:46:22 UTC 2012

Modified Files:
src/sys/dev/wsfont: files.wsfont wsfont.c
Removed Files:
src/sys/dev/wsfont: FreeMono_12x22.h

Log Message:
remove the FreeMono font for licensing reasons


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/dev/wsfont/FreeMono_12x22.h
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/wsfont/files.wsfont
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/files.wsfont
diff -u src/sys/dev/wsfont/files.wsfont:1.18 src/sys/dev/wsfont/files.wsfont:1.19
--- src/sys/dev/wsfont/files.wsfont:1.18	Wed Dec 28 18:29:48 2011
+++ src/sys/dev/wsfont/files.wsfont	Thu Apr  5 02:46:21 2012
@@ -1,4 +1,4 @@
-# 	$NetBSD: files.wsfont,v 1.18 2011/12/28 18:29:48 macallan Exp $
+# 	$NetBSD: files.wsfont,v 1.19 2012/04/05 02:46:21 macallan Exp $
 
 defpseudo wsfont
 
@@ -24,6 +24,5 @@ defflag	opt_wsfont.h		FONT_BOLD8x16
 FONT_DEJAVU_SANS_MONO12x22
 FONT_DROID_SANS_MONO12x22
 FONT_DROID_SANS_MONO9x18
-FONT_FREEMONO12x22
 
 file	dev/wsfont/wsfontdev.c	wsfont needs-flag

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.54 src/sys/dev/wsfont/wsfont.c:1.55
--- src/sys/dev/wsfont/wsfont.c:1.54	Fri Jan 13 16:08:02 2012
+++ src/sys/dev/wsfont/wsfont.c	Thu Apr  5 02:46:21 2012
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.54 2012/01/13 16:08:02 macallan Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.55 2012/04/05 02:46:21 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.54 2012/01/13 16:08:02 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.55 2012/04/05 02:46:21 macallan Exp $);
 
 #include opt_wsfont.h
 
@@ -127,10 +127,6 @@ __KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1
 #include dev/wsfont/Droid_Sans_Mono_9x18.h
 #endif
 
-#ifdef FONT_FREEMONO12x22
-#include dev/wsfont/FreeMono_12x22.h
-#endif
-
 /* Make sure we always have at least one bitmap font. */
 #ifndef HAVE_FONT
 #define HAVE_FONT 1
@@ -220,9 +216,6 @@ static struct font builtin_fonts[] = {
 #ifdef FONT_DROID_SANS_MONO9x18
 	{ { NULL, NULL }, Droid_Sans_Mono_9x18, 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
 #endif
-#ifdef FONT_FREEMONO12x22
-	{ { NULL, NULL }, FreeMono_12x22, 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
-#endif
 	{ { NULL, NULL }, NULL, 0, 0, 0 },
 };
 



CVS commit: src/sys/dev/wsfont

2012-01-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Jan 13 16:08:02 UTC 2012

Modified Files:
src/sys/dev/wsfont: wsfont.c

Log Message:
make this compile again with rotation enabled


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.53 src/sys/dev/wsfont/wsfont.c:1.54
--- src/sys/dev/wsfont/wsfont.c:1.53	Wed Jan 11 15:52:32 2012
+++ src/sys/dev/wsfont/wsfont.c	Fri Jan 13 16:08:02 2012
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.53 2012/01/11 15:52:32 macallan Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.54 2012/01/13 16:08:02 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.53 2012/01/11 15:52:32 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.54 2012/01/13 16:08:02 macallan Exp $);
 
 #include opt_wsfont.h
 
@@ -506,9 +506,9 @@ wsfont_rotate(int cookie, int rotate)
 	default:
 		return (-1);
 	}
-
+	/* rotation works only with bitmap fonts so far */
 	ncookie = wsfont_find(font-name, font-fontwidth, font-fontheight, 
-	font-stride, 0, 0);
+	font-stride, 0, 0, WSFONT_FIND_BITMAP);
 
 	return (ncookie);
 }



CVS commit: src/sys/dev/wsfont

2012-01-04 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan  4 15:53:49 UTC 2012

Modified Files:
src/sys/dev/wsfont: wsfont.h

Log Message:
add WSFONT_GLYPH() to get a pointer to a given glyph in a given font


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/wsfont/wsfont.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.h
diff -u src/sys/dev/wsfont/wsfont.h:1.22 src/sys/dev/wsfont/wsfont.h:1.23
--- src/sys/dev/wsfont/wsfont.h:1.22	Thu Dec 22 05:01:15 2011
+++ src/sys/dev/wsfont/wsfont.h	Wed Jan  4 15:53:49 2012
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.h,v 1.22 2011/12/22 05:01:15 macallan Exp $	*/
+/* 	$NetBSD: wsfont.h,v 1.23 2012/01/04 15:53:49 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,8 @@
 
 #define WSFONT_FLAGS_MASK	0x7f00
 #define WSFONT_FLAG_OPT		0x0100	/* use alternate font */
-
+#define WSFONT_GLYPH(c, font)	((uint8_t *)font-data + \
+		((c) - font-firstchar) * font-stride * font-fontheight)
 /*
  * Example:
  *



CVS commit: src/sys/dev/wsfont

2011-12-21 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Dec 22 05:01:15 UTC 2011

Modified Files:
src/sys/dev/wsfont: files.wsfont wsfont.c wsfont.h
Added Files:
src/sys/dev/wsfont: DejaVu_Sans_Mono_12x22.h Droid_Sans_Mono_12x22.h
FreeMono_12x22.h

Log Message:
add some pre-rendered anti-aliased fonts from pkgsrc:
- DejaVu Sans Mono from fonts/dejavu-ttf
- Droid Sans Mono from fonts/droid-ttf
- Free Mono from fonts/freefonts-ttf


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/wsfont/DejaVu_Sans_Mono_12x22.h \
src/sys/dev/wsfont/Droid_Sans_Mono_12x22.h \
src/sys/dev/wsfont/FreeMono_12x22.h
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/wsfont/files.wsfont
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/wsfont/wsfont.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/wsfont/wsfont.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffs are larger than 1MB and have been omitted


CVS commit: src/sys/dev/wsfont

2010-07-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Jul 22 12:52:59 UTC 2010

Modified Files:
src/sys/dev/wsfont: wsfont.c

Log Message:
Umm, revert unintended changes.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.48 src/sys/dev/wsfont/wsfont.c:1.49
--- src/sys/dev/wsfont/wsfont.c:1.48	Thu Jul 22 12:48:00 2010
+++ src/sys/dev/wsfont/wsfont.c	Thu Jul 22 12:52:59 2010
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.48 2010/07/22 12:48:00 tsutsui Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.49 2010/07/22 12:52:59 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.48 2010/07/22 12:48:00 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.49 2010/07/22 12:52:59 tsutsui Exp $);
 
 #include opt_wsfont.h
 
@@ -379,9 +379,9 @@
 struct wsdisplay_font *
 wsfont_rotate_ccw_internal(struct wsdisplay_font *font)
 {
-	int b, n, r, namelen, newstride;
+	int b, n, r, newstride;
 	struct wsdisplay_font *newfont;
-	char *newname, *newbits;
+	char *newbits;
 
 	/* Duplicate the existing font... */
 	newfont = malloc(sizeof(*font), M_DEVBUF, M_WAITOK);
@@ -390,12 +390,6 @@
 
 	*newfont = *font;
 
-	namelen = strlen(font-name) + 4;
-	newname = malloc(namelen, M_DEVBUF, M_WAITOK);
-	strlcpy(newname, font-name, namelen);
-	strlcat(newname, _ccw, namelen);
-	newfont-name = newname;
-
 	/* Allocate a buffer big enough for the rotated font. */
 	newstride = (font-fontheight + 7) / 8;
 	newbits = malloc(newstride * font-fontwidth * font-numchars,



CVS commit: src/sys/dev/wsfont

2010-07-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Jul 22 13:23:03 UTC 2010

Modified Files:
src/sys/dev/wsfont: wsfont.c

Log Message:
In wsfont_rotate_cw_internal() and wsfont_rotate_ccw_internal(),
give a new name to rotated fonts so that 8x8 (and other X==Y) fonts
can be used properly on CW and CCW screens.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/wsfont/wsfont.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.49 src/sys/dev/wsfont/wsfont.c:1.50
--- src/sys/dev/wsfont/wsfont.c:1.49	Thu Jul 22 12:52:59 2010
+++ src/sys/dev/wsfont/wsfont.c	Thu Jul 22 13:23:02 2010
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.49 2010/07/22 12:52:59 tsutsui Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.50 2010/07/22 13:23:02 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.49 2010/07/22 12:52:59 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.50 2010/07/22 13:23:02 tsutsui Exp $);
 
 #include opt_wsfont.h
 
@@ -314,9 +314,9 @@
 struct wsdisplay_font *
 wsfont_rotate_cw_internal(struct wsdisplay_font *font)
 {
-	int b, n, r, newstride;
+	int b, n, r, namelen, newstride;
 	struct wsdisplay_font *newfont;
-	char *newbits;
+	char *newname, *newbits;
 
 	/* Duplicate the existing font... */
 	newfont = malloc(sizeof(*font), M_DEVBUF, M_WAITOK);
@@ -325,6 +325,12 @@
 
 	*newfont = *font;
 
+	namelen = strlen(font-name) + 4;
+	newname = malloc(namelen, M_DEVBUF, M_WAITOK);
+	strlcpy(newname, font-name, namelen);
+	strlcat(newname, cw, namelen);
+	newfont-name = newname;
+
 	/* Allocate a buffer big enough for the rotated font. */
 	newstride = (font-fontheight + 7) / 8;
 	newbits = malloc(newstride * font-fontwidth * font-numchars,
@@ -379,9 +385,9 @@
 struct wsdisplay_font *
 wsfont_rotate_ccw_internal(struct wsdisplay_font *font)
 {
-	int b, n, r, newstride;
+	int b, n, r, namelen, newstride;
 	struct wsdisplay_font *newfont;
-	char *newbits;
+	char *newname, *newbits;
 
 	/* Duplicate the existing font... */
 	newfont = malloc(sizeof(*font), M_DEVBUF, M_WAITOK);
@@ -390,6 +396,12 @@
 
 	*newfont = *font;
 
+	namelen = strlen(font-name) + 4;
+	newname = malloc(namelen, M_DEVBUF, M_WAITOK);
+	strlcpy(newname, font-name, namelen);
+	strlcat(newname, ccw, namelen);
+	newfont-name = newname;
+
 	/* Allocate a buffer big enough for the rotated font. */
 	newstride = (font-fontheight + 7) / 8;
 	newbits = malloc(newstride * font-fontwidth * font-numchars,



CVS commit: src/sys/dev/wsfont

2010-07-21 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jul 21 12:10:18 UTC 2010

Modified Files:
src/sys/dev/wsfont: vt220l8x16.h

Log Message:
Explicitly specify WSDISPLAY_FONTORDER_L2R for byte order even though
this one has 8 bit (one byte) width, because rasops(4) seems to require it.
(vga(4) on arc and shark doesn't require it)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/wsfont/vt220l8x16.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/vt220l8x16.h
diff -u src/sys/dev/wsfont/vt220l8x16.h:1.6 src/sys/dev/wsfont/vt220l8x16.h:1.7
--- src/sys/dev/wsfont/vt220l8x16.h:1.6	Sun Dec 11 12:24:12 2005
+++ src/sys/dev/wsfont/vt220l8x16.h	Wed Jul 21 12:10:18 2010
@@ -1,4 +1,4 @@
-/* 	$NetBSD: vt220l8x16.h,v 1.6 2005/12/11 12:24:12 christos Exp $	*/
+/* 	$NetBSD: vt220l8x16.h,v 1.7 2010/07/21 12:10:18 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch
@@ -46,7 +46,7 @@
 	16,/* height */
 	1,/* stride */
 	WSDISPLAY_FONTORDER_L2R,	/* bit order */
-	0,/* byte order */
+	WSDISPLAY_FONTORDER_L2R,	/* byte order */
 	vt220l8x16_data			/* data */
 };
 



CVS commit: src/sys/dev/wsfont

2010-05-03 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue May  4 04:53:59 UTC 2010

Modified Files:
src/sys/dev/wsfont: wsfont.c wsfont.h

Log Message:
add translation tables for ISO fonts in order to map unicode box drawing
characters to something else than whitespaces


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/wsfont/wsfont.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/wsfont/wsfont.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfont/wsfont.c
diff -u src/sys/dev/wsfont/wsfont.c:1.46 src/sys/dev/wsfont/wsfont.c:1.47
--- src/sys/dev/wsfont/wsfont.c:1.46	Sat Apr 17 13:36:22 2010
+++ src/sys/dev/wsfont/wsfont.c	Tue May  4 04:53:59 2010
@@ -1,4 +1,4 @@
-/* 	$NetBSD: wsfont.c,v 1.46 2010/04/17 13:36:22 nonaka Exp $	*/
+/* 	$NetBSD: wsfont.c,v 1.47 2010/05/04 04:53:59 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.46 2010/04/17 13:36:22 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsfont.c,v 1.47 2010/05/04 04:53:59 macallan Exp $);
 
 #include opt_wsfont.h
 
@@ -187,6 +187,9 @@
 #ifdef FONT_OMRON12x20
 	{ { NULL, NULL }, omron12x20, 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
 #endif
+#ifdef FONT_TERMINUS8x16
+	{ { NULL, NULL }, terminus8x16, 0, 0, WSFONT_STATIC | WSFONT_BUILTIN },
+#endif
 	{ { NULL, NULL }, NULL, 0, 0, 0 },
 };
 
@@ -835,6 +838,39 @@
 	 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 181
 };
 
+/* 
+ * map all variants of the box drawing characters to the same basic shapes for
+ * now, encoded like this:
+ *
+ *1
+ *1
+ * 888 222
+ *4
+ *4
+ *
+ * so an upright line would be 0x05
+ */
+#define FL |WSFONT_FLAG_OPT
+static const u_int32_t netbsd_boxes[] = {
+/*00*/ 0x0a FL, 0x0a FL, 0x05 FL, 0x05 FL, 0x0a FL, 0x0a FL, 0x05 FL, 0x05 FL,
+/*08*/ 0x0a FL, 0x0a FL, 0x05 FL, 0x05 FL, 0x06 FL, 0x06 FL, 0x06 FL, 0x06 FL,
+/*10*/ 0x0c FL, 0x0c FL, 0x0c FL, 0x0c FL, 0x03 FL, 0x03 FL, 0x03 FL, 0x03 FL,
+/*18*/ 0x09 FL, 0x09 FL, 0x09 FL, 0x09 FL, 0x07 FL, 0x07 FL, 0x07 FL, 0x07 FL,
+/*20*/ 0x07 FL, 0x07 FL, 0x07 FL, 0x07 FL, 0x0d FL, 0x0d FL, 0x0d FL, 0x0d FL,
+/*28*/ 0x0d FL, 0x0d FL, 0x0d FL, 0x0d FL, 0x0e FL, 0x0e FL, 0x0e FL, 0x0e FL,
+/*30*/ 0x0e FL, 0x0e FL, 0x0e FL, 0x0e FL, 0x0b FL, 0x0b FL, 0x0b FL, 0x0b FL,
+/*38*/ 0x0b FL, 0x0b FL, 0x0b FL, 0x0b FL, 0x0f FL, 0x0f FL, 0x0f FL, 0x0f FL,
+/*40*/ 0x0f FL, 0x0f FL, 0x0f FL, 0x0f FL, 0x0f FL, 0x0f FL, 0x0f FL, 0x0f FL,
+/*48*/ 0x0f FL, 0x0f FL, 0x0f FL, 0x0f FL, 0x0a FL, 0x0a FL, 0x05 FL, 0x05 FL,
+/*50*/ 0x0a FL, 0x05 FL, 0x06 FL, 0x06 FL, 0x06 FL, 0x0c FL, 0x0c FL, 0x0c FL,
+/*58*/ 0x03 FL, 0x03 FL, 0x03 FL, 0x09 FL, 0x09 FL, 0x09 FL, 0x07 FL, 0x07 FL,
+/*60*/ 0x07 FL, 0x0d FL, 0x0d FL, 0x0d FL, 0x0e FL, 0x0e FL, 0x0e FL, 0x0b FL,
+/*68*/ 0x0b FL, 0x0b FL, 0x0f FL, 0x0f FL, 0x0f FL, 0x06 FL, 0x0c FL, 0x09 FL,
+/*70*/ 0x03 FL,0 FL,0 FL,0 FL, 0x08 FL, 0x01 FL, 0x02 FL, 0x04 FL,
+/*78*/ 0x08 FL, 0x01 FL, 0x02 FL, 0x04 FL, 0x0a FL, 0x05 FL, 0x0a FL, 0x05 FL
+};
+#undef FL
+
 static const u_int8_t iso7_chars_32[] = {
 	175, 0,  0,  0,  0, 162, 0, 161
 };
@@ -848,6 +884,9 @@
 static const struct wsfont_level2_glyphmap iso7_level2_32 =
 { 20, 8, iso7_chars_32, 1 };
 
+static const struct wsfont_level2_glyphmap netbsd_box_drawing =
+{ 0, 128, netbsd_boxes, 4 };
+
 static const struct wsfont_level2_glyphmap *iso7_level1[] = {
 	iso7_level2_0, NULL, NULL, iso7_level2_3,
 	NULL, NULL, NULL, NULL,
@@ -857,14 +896,28 @@
 	NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL,
-	iso7_level2_32
+	iso7_level2_32, NULL, NULL, NULL,
+	NULL, netbsd_box_drawing
+};
+
+static const struct wsfont_level2_glyphmap *iso_level1[] = {
+	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL,
+	NULL, netbsd_box_drawing
 };
 
 static const struct wsfont_level1_glyphmap encodings[] = {
-	{ NULL, 0, 0 },			/* WSDISPLAY_FONTENC_ISO */
+	{ iso_level1, 0, 0x26 },	/* WSDISPLAY_FONTENC_ISO */
 	{ ibm437_level1, 0, 38 },	/* WSDISPLAY_FONTENC_IBM */
 	{ NULL, 0, 0 },			/* WSDISPLAY_FONTENC_PCVT */
-	{ iso7_level1, 0, 33 },		/* WSDISPLAY_FONTENC_ISO7 */
+	{ iso7_level1, 0, 0x26 },	/* WSDISPLAY_FONTENC_ISO7 */
 };
 
 #define MAX_ENCODING (sizeof(encodings) / sizeof(encodings[0]))
@@ -879,9 +932,6 @@
 	const struct wsfont_level2_glyphmap *map2;
 	int hi, lo;
 
-	if (font-encoding == WSDISPLAY_FONTENC_ISO)
-		return (c);
-
 	if (font-encoding  0 || font-encoding = MAX_ENCODING)
 		return (-1);
 
@@ -894,6 +944,10 @@
 
 	map2 = map1-level2[hi - map1-base];
 
+	/* so we don't need an identical level 2 table for hi == 0 */
+	if (hi == 0  font-encoding == WSDISPLAY_FONTENC_ISO)
+