aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-08 19:50:56 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-08 19:52:22 +0200
commitdfcf2da3561dc2708c0b9ebbcf5bb1bbd3c33749 (patch)
treec94dc645d4fde856c17d73f970d966a26c177540
parentd4b1ddbeebc469d9696e0877cc6bf1d21663eccf (diff)
downloadfnt-dfcf2da3561dc2708c0b9ebbcf5bb1bbd3c33749.tar.gz
Convert bd2 -> otb
-rw-r--r--Makefile16
-rw-r--r--bdf2otb.pe7
-rw-r--r--ttf2pfa.pe (renamed from generate-pfa.pe)0
-rw-r--r--ttf2t42.pe (renamed from generate-t42.pe)0
4 files changed, 19 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d7656ae..8bbf18d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,25 @@
+.SUFFIXES: .ttf .afm .dit .bdf .otb
+
GROFF_SYS_FONTDIR ?= /usr/share/groff_font
-.SUFFIXES: .ttf .afm .dit
.ttf.afm:
- cd var && fontforge -script ../generate-t42.pe ../$<
+ cd var && fontforge -script ../ttf2t42.pe ../$<
.afm.dit:
cd var && ../afmtodit ${<:S/^var\///} ../textmap ${@:S/^var\///}
-install:
+.bdf.otb:
+ cd var && fontforge -script ../bdf2otb.pe ../$<
+
+fonts:
+ cp var/*.otb ~/.fonts
+
+groff:
cp var/*.t42 var/[A-Z] var/[A-Z][A-Z] var/[A-Z][A-Z][A-Z] \
"$(GROFF_SYS_FONTDIR)"/devps
[ -d "$(GROFF_SYS_FONTDIR)"/devpdf ] && cp var/*.pfa \
"$(GROFF_SYS_FONTDIR)"/devpdf
clean:
- find var -type f ! -name '*.ttf' | while read x; do rm "$$x"; done
+ find var -type f ! -name '*.ttf' ! -name '*.bdf' | \
+ while read x; do rm "$$x"; done
diff --git a/bdf2otb.pe b/bdf2otb.pe
new file mode 100644
index 0000000..a61bbee
--- /dev/null
+++ b/bdf2otb.pe
@@ -0,0 +1,7 @@
+#!/usr/bin/env fontforge
+i=1
+while (i<$argc)
+ Open($argv[i])
+ Generate($argv[i]:r + ".otb")
+ i = i+1
+endloop
diff --git a/generate-pfa.pe b/ttf2pfa.pe
index 281a0b0..281a0b0 100644
--- a/generate-pfa.pe
+++ b/ttf2pfa.pe
diff --git a/generate-t42.pe b/ttf2t42.pe
index 6134be5..6134be5 100644
--- a/generate-t42.pe
+++ b/ttf2t42.pe