From: Felix Zielcke <fzielcke@z-51.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] move functionality of font_path() directly to util/grub-mkconfig.in and prefer unicode.pf2 over ascii.pf2
Date: Sat, 08 Aug 2009 07:36:20 +0200 [thread overview]
Message-ID: <1249709780.3537.14.camel@fz.local> (raw)
In-Reply-To: <1249708335.28996.21.camel@mj>
[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]
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
[-- Attachment #2: font.diff.2 --]
[-- Type: text/plain, Size: 1078 bytes --]
2009-08-08 Felix Zielcke <fzielcke@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
next prev parent reply other threads:[~2009-08-08 5:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 9:39 [PATCH] move functionality of font_path() directly to util/grub-mkconfig.in and prefer unicode.pf2 over ascii.pf2 Felix Zielcke
2009-08-07 11:39 ` Robert Millan
2009-08-07 12:02 ` Felix Zielcke
2009-08-07 12:57 ` Felix Zielcke
2009-08-08 5:12 ` Pavel Roskin
2009-08-08 5:36 ` Felix Zielcke [this message]
2009-08-08 5:41 ` Felix Zielcke
2009-08-08 5:49 ` Pavel Roskin
2009-08-08 6:04 ` Felix Zielcke
2009-08-08 6:35 ` Pavel Roskin
2009-08-08 6:41 ` Felix Zielcke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1249709780.3537.14.camel@fz.local \
--to=fzielcke@z-51.de \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.