Added a converfontto to easily install new fonts with a particular encoding - enscript - GNU Enscript
(HTM) git clone git://thinkerwim.org/enscript.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 4828bae2f661b7b29b6db6d53bb8ebe17c5c1b94
(DIR) parent 340eef27684c312f1e1e94ddf7f2bc6a573001b0
(HTM) Author: Wim Stockman <wim@yasendfile.org>
Date: Tue, 7 Mar 2023 16:43:36 +0100
Added a converfontto to easily install new fonts with a particular encoding
Diffstat:
A convertfontto.sh | 12 ++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/convertfontto.sh b/convertfontto.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+set -eu
+font=${1?Please give a font};
+encoding=${3:-iso8859-15};
+outputfile=${2:-"${font%.*}-$encoding"}
+destination=${4:-~/fonts};
+fontforge -lang=ff -c "Open(\"$font\");Reencode(\"$encoding\");Generate(\"$outputfile.pfa\")";
+mkdir -p $destination
+cp "$outputfile.pfa" "$destination/"
+cp "$outputfile.afm" "$destination/"
+cd $destination
+mkafmmap *.afm