diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:44:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:44:05 +0000 |
commit | d318611dd6f23fcfedd50e9b9e24620b102ba96a (patch) | |
tree | 8b9eef82ca40fdd5a8deeabf07572074c236095d /font/scripts/gendesc.sh | |
parent | Initial commit. (diff) | |
download | groff-upstream/1.23.0.tar.xz groff-upstream/1.23.0.zip |
Adding upstream version 1.23.0.upstream/1.23.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'font/scripts/gendesc.sh')
-rwxr-xr-x | font/scripts/gendesc.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/font/scripts/gendesc.sh b/font/scripts/gendesc.sh new file mode 100755 index 0000000..5bf5376 --- /dev/null +++ b/font/scripts/gendesc.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Usage: gendesc.sh <input .proto> <RES> <CPI> <LPI> <list of fonts> +if test -z "$1" || test -z "$2" || test -z "$3" || test -z "$4" || \ + test -z "$5"; then + echo "genfonts.sh: missing parameter"; exit 255; +fi +INPUT=$1 +RES=$2 +CPI=$3 +LPI=$4 +shift 4 +NBFONTS=`echo $#` +FONTS=`echo $*` +sed -e "s/^res .*$/res $RES/" \ + -e "s/^hor .*$/hor `expr $RES / $CPI`/" \ + -e "s/^vert .*$/vert `expr $RES / $LPI`/" \ + -e "s/^fonts .*$/fonts $NBFONTS $FONTS/" \ + $INPUT |