Am Samstag, den 08.08.2009, 01:12 -0400 schrieb Pavel Roskin:
> On Fri, 2009-08-07 at 14:57 +0200, Felix Zielcke wrote:
> 
> > I commited it now with an ack from Robert on IRC.
> 
> Sorry, I'm commenting after it has been committed.  Anyway, please note
> that having an approval doesn't absolve you from testing the code on
> your own.  Reviews are not testing.  There was a warning introduced by
> your change, and there was a syntax error after "ascii".  Also, the
> formatting of the moved code should have been changed to use the same
> indentation as the target file.  I have fixed all that.

Sorry.

> Could you please explain what I should do to keep using ascii.pf2?  I
> checked the script, but don't see any variable controlling that.  "make
> install" would install both unicode.pf2 and ascii.pf2, so unicode.pf2
> would always be preferred.

With the old code ascii.pf2 would be always preferred.
There wasn't either a way to specify it.

> If changing the default, it's a good style to provide an easy way for
> users to keep the old setting, and I just don't see it, short or
> removing /usr/src/unifont.bdf and /usr/local/share/grub/unicode.pf2 so
> that they are never reinstalled or detected by GRUB.

Here's now a patch which allows users to specifiy the used font with
GRUB_FONT=ascii


-- 
Felix Zielcke
Proud Debian Maintainer
2009-08-08  Felix Zielcke  <fziel...@z-51.de>

        * 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
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to