2009-08-08 Felix Zielcke * util/grub-mkconfig.in: Allow the user to specify the used font with GRUB_FONT. diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 7756b49..55135f8 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -155,6 +155,19 @@ esac case ${GRUB_TERMINAL_OUTPUT} in gfxterm) for dir in ${pkgdatadir} /boot/grub /usr/share/grub ; do + if [ -n "$GRUB_FONT" ] ; then + path="${dir}/${GRUB_FONT}.pf2" + if is_path_readable_by_grub ${path} > /dev/null ; then + GRUB_FONT_PATH=${path} + if [ "${GRUB_FONT}" = "ascii" ] + export LANG=C + fi + break + else + echo "No such font ${GRUB_FONT}.pf2" >&2 + exit 1 + fi + else for basename in unicode unifont ascii; do path="${dir}/${basename}.pf2" if is_path_readable_by_grub ${path} > /dev/null ; then @@ -168,6 +181,7 @@ case ${GRUB_TERMINAL_OUTPUT} in fi break 2 done + fi done if [ -z "${GRUB_FONT_PATH}" ] ; then # fallback to the native terminal for this platform