commit 1e38849c7cc7853bb5dc2e396362b5c91241b011
parent c34e6896d09d9bcea2e2f5f88373414df6218ff9
Author: Frederic Cambus <fred@statdns.com>
Date: Sat, 20 Jun 2020 12:18:04 +0200
Add programs for each font size to allow creating raw font files.
The resulting exports can be loaded into a wscons display device
using wsfontload(8).
Diffstat:
6 files changed, 173 insertions(+), 0 deletions(-)
diff --git a/wsfont/Makefile b/wsfont/Makefile
@@ -0,0 +1,25 @@
+#
+# Spleen 1.7.0
+# Copyright (c) 2018-2020, Frederic Cambus
+# https://www.cambus.net/
+#
+# Created: 2020-06-20
+# Last Updated: 2020-06-20
+#
+# Spleen is released under the BSD 2-Clause license.
+# See LICENSE file for details.
+#
+
+SIZES = 5x8 8x16 12x24 16x32 32x64
+
+all:
+.for size in $(SIZES)
+ $(CC) $(CFLAGS) spleen${size}.c -o spleen${size}
+ spleen${size} > spleen-${size}
+ spleen${size} | uuencode spleen-${size} > spleen-${size}.uue
+.endfor
+
+clean:
+.for size in $(SIZES)
+ rm -f spleen${size} spleen-${size} *.uue
+.endfor
diff --git a/wsfont/spleen12x24.c b/wsfont/spleen12x24.c
@@ -0,0 +1,29 @@
+/*
+ * Spleen 1.7.0
+ * Copyright (c) 2018-2020, Frederic Cambus
+ * https://www.cambus.net/
+ *
+ * Created: 2020-06-20
+ * Last Updated: 2020-06-20
+ *
+ * Spleen is released under the BSD 2-Clause license.
+ * See LICENSE file for details.
+ */
+
+#include <stdio.h>
+#include <time.h>
+
+#include <dev/wscons/wsconsio.h>
+#include <dev/wsfont/spleen12x24.h>
+
+int main() {
+ size_t loop;
+
+ for (loop = 0; loop < 32 * 2 * 24; loop++)
+ printf("%c", 0);
+
+ for (loop = 0; loop < 224 * 2 * 24; loop++)
+ printf("%c", spleen12x24_data[loop]);
+
+ return 0;
+}
diff --git a/wsfont/spleen16x32.c b/wsfont/spleen16x32.c
@@ -0,0 +1,29 @@
+/*
+ * Spleen 1.7.0
+ * Copyright (c) 2018-2020, Frederic Cambus
+ * https://www.cambus.net/
+ *
+ * Created: 2020-06-20
+ * Last Updated: 2020-06-20
+ *
+ * Spleen is released under the BSD 2-Clause license.
+ * See LICENSE file for details.
+ */
+
+#include <stdio.h>
+#include <time.h>
+
+#include <dev/wscons/wsconsio.h>
+#include <dev/wsfont/spleen16x32.h>
+
+int main() {
+ size_t loop;
+
+ for (loop = 0; loop < 32 * 2 * 32; loop++)
+ printf("%c", 0);
+
+ for (loop = 0; loop < 224 * 2 * 32; loop++)
+ printf("%c", spleen16x32_data[loop]);
+
+ return 0;
+}
diff --git a/wsfont/spleen32x64.c b/wsfont/spleen32x64.c
@@ -0,0 +1,29 @@
+/*
+ * Spleen 1.7.0
+ * Copyright (c) 2018-2020, Frederic Cambus
+ * https://www.cambus.net/
+ *
+ * Created: 2020-06-20
+ * Last Updated: 2020-06-20
+ *
+ * Spleen is released under the BSD 2-Clause license.
+ * See LICENSE file for details.
+ */
+
+#include <stdio.h>
+#include <time.h>
+
+#include <dev/wscons/wsconsio.h>
+#include <dev/wsfont/spleen32x64.h>
+
+int main() {
+ size_t loop;
+
+ for (loop = 0; loop < 32 * 4 * 64; loop++)
+ printf("%c", 0);
+
+ for (loop = 0; loop < 224 * 4 * 64; loop++)
+ printf("%c", spleen32x64_data[loop]);
+
+ return 0;
+}
diff --git a/wsfont/spleen5x8.c b/wsfont/spleen5x8.c
@@ -0,0 +1,32 @@
+/*
+ * Spleen 1.7.0
+ * Copyright (c) 2018-2020, Frederic Cambus
+ * https://www.cambus.net/
+ *
+ * Created: 2020-06-20
+ * Last Updated: 2020-06-20
+ *
+ * Spleen is released under the BSD 2-Clause license.
+ * See LICENSE file for details.
+ */
+
+#include <stdio.h>
+#include <time.h>
+
+#include <dev/wscons/wsconsio.h>
+#include <dev/wsfont/spleen5x8.h>
+
+int main() {
+ size_t loop;
+
+ for (loop = 0; loop < 32 * 8; loop++)
+ printf("%c", 0);
+
+ for (loop = 0; loop < 96 * 8; loop++)
+ printf("%c", spleen5x8_data[loop]);
+
+ for (loop = 0; loop < 128 * 8; loop++)
+ printf("%c", 0);
+
+ return 0;
+}
diff --git a/wsfont/spleen8x16.c b/wsfont/spleen8x16.c
@@ -0,0 +1,29 @@
+/*
+ * Spleen 1.7.0
+ * Copyright (c) 2018-2020, Frederic Cambus
+ * https://www.cambus.net/
+ *
+ * Created: 2020-06-20
+ * Last Updated: 2020-06-20
+ *
+ * Spleen is released under the BSD 2-Clause license.
+ * See LICENSE file for details.
+ */
+
+#include <stdio.h>
+#include <time.h>
+
+#include <dev/wscons/wsconsio.h>
+#include <dev/wsfont/spleen8x16.h>
+
+int main() {
+ size_t loop;
+
+ for (loop = 0; loop < 32 * 16; loop++)
+ printf("%c", 0);
+
+ for (loop = 0; loop < 224 * 16; loop++)
+ printf("%c", spleen8x16_data[loop]);
+
+ return 0;
+}