#!/bin/sh

# This script will generate GRUB 2 PFF2 font files out of BDF.
# You need the GRUB font utilities "Convert" program for this.

DIR=$( dirname $0 )

for font in "$@"
do
  out=`basename "${font}" | cut -d'.' -f1`
  out="${out}.pf2"
  echo "Converting ${font} -> ${out} ..."
  java -cp "${DIR}/build/fonttool.jar" \
    org.gnu.grub.fonttool.Converter \
    --in="${font}" \
    --out="${out}"
done
