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 08:04:43 +0200 [thread overview]
Message-ID: <1249711483.3537.16.camel@fz.local> (raw)
In-Reply-To: <1249710565.28996.43.camel@mj>
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]
Am Samstag, den 08.08.2009, 01:49 -0400 schrieb Pavel Roskin:
> On Sat, 2009-08-08 at 07:36 +0200, Felix Zielcke wrote:
>
> > > 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.
>
> I see. Maybe that's what we should have fixed first.
>
> > > 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
>
> First of all, I hope that the patch you will actually commit will use
> sane formatting. Diffs that ignore spacing changes are OK for review,
> but not for applying as is.
Yes.
> I think it would be more natural to let the user specify the full path
> to the file. Setting LANG=C seems unneeded in this case. After all,
> it's the user's choice, and we cannot examine the font file to check
> which characters it has.
Ok here's a new one.
--
Felix Zielcke
Proud Debian Maintainer
[-- Attachment #2: font.diff.3 --]
[-- Type: text/plain, Size: 1032 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.
Index: util/grub-mkconfig.in
===================================================================
--- util/grub-mkconfig.in (revision 2482)
+++ util/grub-mkconfig.in (working copy)
@@ -154,6 +154,14 @@ esac
# check for terminals that require fonts
case ${GRUB_TERMINAL_OUTPUT} in
gfxterm)
+ if [ -n "$GRUB_FONT" ] ; then
+ if is_path_readable_by_grub ${GRUB_FONT} > /dev/null ; then
+ GRUB_FONT_PATH=${GRUB_FONT}
+ else
+ echo "No such font or not readable by grub: ${GRUB_FONT}" >&2
+ exit 1
+ fi
+ else
for dir in ${pkgdatadir} /boot/grub /usr/share/grub ; do
for basename in unicode unifont ascii; do
path="${dir}/${basename}.pf2"
@@ -169,6 +177,7 @@ case ${GRUB_TERMINAL_OUTPUT} in
break 2
done
done
+ fi
if [ -z "${GRUB_FONT_PATH}" ] ; then
# fallback to the native terminal for this platform
unset GRUB_TERMINAL_OUTPUT
next prev parent reply other threads:[~2009-08-08 6:03 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
2009-08-08 5:41 ` Felix Zielcke
2009-08-08 5:49 ` Pavel Roskin
2009-08-08 6:04 ` Felix Zielcke [this message]
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=1249711483.3537.16.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.