summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-10-24 22:48:24 -0700
committerMichael Forney <mforney@mforney.org>2016-10-28 01:18:25 -0700
commita900ca53f0c8da4df63780a8482863c9b92bc63d (patch)
tree5201990ad6828d14f1fc5ef573df3ebb3f3c4743
parente28c04cdd3869701ee13b84587359ff698bb9d1d (diff)
Add terminus-font 4.40
-rw-r--r--desktop/gen.rc1
-rw-r--r--desktop/terminus-font/.gitignore2
-rw-r--r--desktop/terminus-font/gen.rc13
-rw-r--r--desktop/terminus-font/rev1
-rw-r--r--desktop/terminus-font/sha2561
-rw-r--r--desktop/terminus-font/ucstoany.awk50
-rw-r--r--desktop/terminus-font/url1
7 files changed, 69 insertions, 0 deletions
diff --git a/desktop/gen.rc b/desktop/gen.rc
index de43857b..1eb79be3 100644
--- a/desktop/gen.rc
+++ b/desktop/gen.rc
@@ -10,4 +10,5 @@ subgen libpciaccess
subgen libxkbcommon
subgen pixman
subgen plan9fonts
+subgen terminus-font
subgen wayland
diff --git a/desktop/terminus-font/.gitignore b/desktop/terminus-font/.gitignore
new file mode 100644
index 00000000..272eca1a
--- /dev/null
+++ b/desktop/terminus-font/.gitignore
@@ -0,0 +1,2 @@
+/src
+/terminus-font-4.40.tar.gz
diff --git a/desktop/terminus-font/gen.rc b/desktop/terminus-font/gen.rc
new file mode 100644
index 00000000..c8ee5d4c
--- /dev/null
+++ b/desktop/terminus-font/gen.rc
@@ -0,0 +1,13 @@
+fn ucstox11 {
+ maps='$srcdir'/uni/^(x11gr.uni 10646-1.uni)
+ build '$outdir'/$1 awk $maps '|' '$dir'/ucstoany.awk '$srcdir'/$1
+ with expr '-v font=$srcdir/'$1' -v charset=ISO10646-1 -f $dir/ucstoany.awk'
+ file share/fonts/terminus/$1 '$outdir'/$1 644
+}
+
+for(size in (12 14 16 20 22 24 28 32)) {
+ for(font in ter-u$size^(n b)^.bdf)
+ ucstox11 $font
+}
+
+fetch curl
diff --git a/desktop/terminus-font/rev b/desktop/terminus-font/rev
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/desktop/terminus-font/rev
@@ -0,0 +1 @@
+1
diff --git a/desktop/terminus-font/sha256 b/desktop/terminus-font/sha256
new file mode 100644
index 00000000..d624c615
--- /dev/null
+++ b/desktop/terminus-font/sha256
@@ -0,0 +1 @@
+64f52c24d3f1c1e39f21e6c43077a9be3e21d4384f176f5766c00558ba670711 terminus-font-4.40.tar.gz
diff --git a/desktop/terminus-font/ucstoany.awk b/desktop/terminus-font/ucstoany.awk
new file mode 100644
index 00000000..067a6249
--- /dev/null
+++ b/desktop/terminus-font/ucstoany.awk
@@ -0,0 +1,50 @@
+{ unimap[unimap_len++] = int("0x" $0) }
+
+function readchar() {
+ name = $2
+ buf = ""
+ while (getline < font) {
+ if ($1 == "ENDCHAR")
+ break
+ if ($1 == "ENCODING")
+ encoding = $2
+ else
+ buf = buf $0 "\n"
+ }
+ names[encoding] = name
+ chars[encoding] = buf
+}
+
+function printchar(i, encoding) {
+ if (!(encoding in names))
+ exit(1)
+ print "STARTCHAR", names[encoding]
+ print "ENCODING", i
+ printf "%s", chars[encoding]
+ print "ENDCHAR"
+}
+
+END {
+ while (getline < font) {
+ if ($1 == "STARTCHAR") {
+ readchar()
+ break
+ }
+ if ($1 == "CHARS")
+ $2 = unimap_len
+ else if ($1 == "FONT")
+ sub(/-[^-]*-[^-]*$/, "-" charset, $2)
+ print
+ }
+ while (getline < font) {
+ if ($1 == "STARTCHAR")
+ readchar()
+ else
+ tail = tail $0 "\n"
+ }
+ for (i = 0; i < unimap_len; ++i) {
+ encoding = unimap[i]
+ printchar(i >= 32 ? encoding : i, encoding)
+ }
+ printf "%s", tail
+}
diff --git a/desktop/terminus-font/url b/desktop/terminus-font/url
new file mode 100644
index 00000000..9f934a3f
--- /dev/null
+++ b/desktop/terminus-font/url
@@ -0,0 +1 @@
+url = "http://downloads.sourceforge.net/project/terminus-font/terminus-font-4.40/terminus-font-4.40.tar.gz"