Index: font/.gitignore
===================================================================
--- font/.gitignore	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
+++ font/.gitignore	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
@@ -0,0 +1,3 @@
+buchla.eot
+buchla.ttf
+buchla.woff
Index: font/cg2.c
===================================================================
--- font/cg2.c	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
+++ font/cg2.c	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
@@ -0,0 +1,1 @@
+../orig/IOLIB/CG2.C
Index: font/index.html
===================================================================
--- font/index.html	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
+++ font/index.html	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <title>Font</title>
+    <style type="text/css">
+      @font-face {
+        font-family: "buchla";
+        src: url("buchla.woff") format("woff"),
+            url("buchla.eot") format("embedded-opentype"),
+            url("buchla.ttf") format("truetype")
+      }
+
+      body {
+        font-family: "buchla";
+        font-size: 24px;
+      }
+    </style>
+  </head>
+  <body>
+    <p>
+      A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
+    </p>
+    <p>
+      a b c d e f g h i j k l m n o p q r s t u v w x y z
+    </p>
+    <p>
+      0 1 2 3 4 5 6 7 8 9
+    </p>
+    <p>
+      ! " # $ % &amp; ' ( ) * + , - . / : ; &lt; = &gt; ? @ [ \ ] ^ _ ` { | } ~
+    </p>
+    <p>
+      &#x2820;
+    <p>
+      &#x2801; &#x2802; &#x2803; &#x2804; &#x2805; &#x2806; &#x2807; &#x2808; &#x2809; &#x280a; &#x280b; &#x280c;
+    </p>
+    <p>
+      &#x2841; &#x2842; &#x2843; &#x2844; &#x2845; &#x2847; &#x2849; &#x284a; &#x284b; &#x284c; &#x284d; &#x284e; &#x284f;
+    </p>
+    <p>
+      &#x280d;&#x280e;&#x280f; &#x2821;&#x2822;&#x2823;&#x2824; &#x2825;&#x2826;&#x2827;&#x2828; &#x2829;&#x282a;&#x282b;&#x282c; &#x282d;&#x282e;&#x282f;&#x2830;
+    </p>
+    <p>
+      &#x2831;&#x2832;&#x2833;&#x2834; &#x2835;&#x2836;&#x2837;&#x2838; &#x2839;&#x283a;&#x283b;&#x283c; &#x283d;&#x283e;&#x283f;&#x2840;
+    </p>
+    <p>
+      &#x2810; &#x2811; &#x2812; &#x2813; &#x2814; &#x2815; &#x2816; &#x2817; &#x2818; &#x2819; &#x281a; &#x281b; &#x281c; &#x281d; &#x281e;
+    </p>
+    <p>
+      &#x2861; &#x2862; &#x2863; &#x2864; &#x2865; &#x2866; &#x2867; &#x2868; &#x2869; &#x286a; &#x286b; &#x286c; &#x286d;
+    </p>
+    <p>
+      &#x2871; &#x2872; &#x2873; &#x2874; &#x2875; &#x2876; &#x2877;
+    </p>
+    <p>
+      &#x2851; &#x2852; &#x2853; &#x2854; &#x2855; &#x2856; &#x2857; &#x2858; &#x2859; &#x285a; &#x285b; &#x285c;
+    </p>
+    <p>
+      &#x285b;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x285c;
+      <br/>
+      &#x2851; Hello &nbsp;&nbsp;&nbsp; &#x2851;
+      <br/>
+      &#x2857;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2855;
+      <br/>
+      &#x2851; World &nbsp;&nbsp;&nbsp; &#x2851;
+      <br/>
+      &#x285a;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2852;&#x2859;
+  </body>
+</html>
Index: font/make-font.sh
===================================================================
--- font/make-font.sh	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
+++ font/make-font.sh	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+gcc -Wall -Wextra -O2 -o svg-glyphs svg-glyphs.c
+
+mkdir -p glyphs
+
+./svg-glyphs
+./svg-font.py
+
+rm buchla.afm svg-glyphs
+rm -r glyphs
Index: font/svg-font.py
===================================================================
--- font/svg-font.py	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
+++ font/svg-font.py	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+
+import fontforge
+
+font = fontforge.font()
+
+font.ascent = 2816
+font.descent = 256
+font.em = 3072
+font.upos = -256
+
+font.copyright = ""
+
+font.fontname = "Buchla"
+font.familyname = "Buchla"
+font.fullname = ""
+
+for i in range(0, 256):
+    if i < 32:
+        code = 10240 + i
+    elif i < 127:
+        code = i
+    else:
+        code = (10240 + 32) + (i - 127);
+
+    print("importing {:04x}".format(code))
+
+    glyph = font.createChar(code)
+    glyph.width = 2048
+
+    glyph.importOutlines("glyphs/{:04x}.svg".format(code))
+
+font.generate("buchla.woff")
+font.generate("buchla.ttf")
+font.generate("buchla.eot")
Index: font/svg-glyphs.c
===================================================================
--- font/svg-glyphs.c	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
+++ font/svg-glyphs.c	(revision 018c029ecb9f02a4005d75f753e1203b72e1f6be)
@@ -0,0 +1,58 @@
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+
+#include "cg2.c"
+
+int32_t main(int32_t argc, char *argv[])
+{
+    (void)argc;
+    (void)argv;
+
+    for (int32_t glyph = 0; glyph < 256; ++glyph) {
+        int32_t code;
+
+        if (glyph < 32) {
+            code = 10240 + glyph;
+        }
+        else if (glyph < 127) {
+            code = glyph;
+        }
+        else {
+            code = (10240 + 32) + (glyph - 127);
+        }
+
+        char name[16];
+
+        snprintf(name, sizeof(name), "glyphs/%04x.svg", code);
+
+        FILE *fh = fopen(name, "w");
+        assert(fh != NULL);
+
+        fprintf(fh, "<?xml version=\"1.0\"?>\n");
+        fprintf(fh, "<svg width=\"2048\" height=\"3072\" viewBox=\"0 0 2048 3072\" xmlns=\"http://www.w3.org/2000/svg\">\n");
+
+        for (int32_t row = 0; row < cg_rows; ++row) {
+            int32_t y = row * 256 + 8;
+            int32_t bits = cgtable[cg_rows - 1 - row][glyph];
+            int32_t mask = 0x01;
+
+            for (int32_t col = 0; col < 8; ++col) {
+                if ((bits & mask) != 0) {
+                    int32_t x = col * 256 + 8;
+
+                    fprintf(fh, "  <path d=\"M %d %d l 240 0 l 0 240 l -240 0 z\"/>\n", x, y);
+                }
+
+                mask <<= 1;
+            }
+        }
+
+        fprintf(fh, "</svg>\n");
+
+        fclose(fh);
+    }
+
+    return 0;
+}
