aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Ankarstr\xf6m <john@ankarstrom.se>2021-06-03 14:33:06 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-08 19:52:05 +0200
commitd4b1ddbeebc469d9696e0877cc6bf1d21663eccf (patch)
tree09b876b6ce6550975ca9115126a575d89a10d770 /Makefile
downloadfnt-d4b1ddbeebc469d9696e0877cc6bf1d21663eccf.tar.gz
Convert ttf -> dit for (g)troff
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d7656ae
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+GROFF_SYS_FONTDIR ?= /usr/share/groff_font
+.SUFFIXES: .ttf .afm .dit
+
+.ttf.afm:
+ cd var && fontforge -script ../generate-t42.pe ../$<
+
+.afm.dit:
+ cd var && ../afmtodit ${<:S/^var\///} ../textmap ${@:S/^var\///}
+
+install:
+ 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