From dfcf2da3561dc2708c0b9ebbcf5bb1bbd3c33749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 8 Jun 2021 19:50:56 +0200 Subject: Convert bd2 -> otb --- Makefile | 16 ++++++++++++---- bdf2otb.pe | 7 +++++++ generate-pfa.pe | 2 -- generate-t42.pe | 3 --- ttf2pfa.pe | 2 ++ ttf2t42.pe | 3 +++ 6 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 bdf2otb.pe delete mode 100644 generate-pfa.pe delete mode 100644 generate-t42.pe create mode 100644 ttf2pfa.pe create mode 100644 ttf2t42.pe 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/generate-pfa.pe deleted file mode 100644 index 281a0b0..0000000 --- a/generate-pfa.pe +++ /dev/null @@ -1,2 +0,0 @@ -Open($1); -Generate($fontname + ".pfa"); diff --git a/generate-t42.pe b/generate-t42.pe deleted file mode 100644 index 6134be5..0000000 --- a/generate-t42.pe +++ /dev/null @@ -1,3 +0,0 @@ -Open($1); -Generate($fontname + ".pfa"); -Generate($fontname + ".t42"); diff --git a/ttf2pfa.pe b/ttf2pfa.pe new file mode 100644 index 0000000..281a0b0 --- /dev/null +++ b/ttf2pfa.pe @@ -0,0 +1,2 @@ +Open($1); +Generate($fontname + ".pfa"); diff --git a/ttf2t42.pe b/ttf2t42.pe new file mode 100644 index 0000000..6134be5 --- /dev/null +++ b/ttf2t42.pe @@ -0,0 +1,3 @@ +Open($1); +Generate($fontname + ".pfa"); +Generate($fontname + ".t42"); -- cgit v1.2.3