From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MZf1y-0005YH-J9 for mharc-grub-devel@gnu.org; Sat, 08 Aug 2009 02:03:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZf1x-0005Y4-D9 for grub-devel@gnu.org; Sat, 08 Aug 2009 02:03:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZf1t-0005Xg-TJ for grub-devel@gnu.org; Sat, 08 Aug 2009 02:03:49 -0400 Received: from [199.232.76.173] (port=43171 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZf1t-0005Xd-Mg for grub-devel@gnu.org; Sat, 08 Aug 2009 02:03:45 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:51688) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MZf1s-0001xO-Uy for grub-devel@gnu.org; Sat, 08 Aug 2009 02:03:45 -0400 Received: from [85.180.53.154] (e180053154.adsl.alicedsl.de [85.180.53.154]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MKv5w-1MZf1r3gBD-000cGx; Sat, 08 Aug 2009 08:03:44 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <1249710565.28996.43.camel@mj> References: <1249551551.3663.7.camel@fz.local> <20090807113928.GM6695@thorin> <1249646572.3592.10.camel@fz.local> <1249649867.3592.11.camel@fz.local> <1249708335.28996.21.camel@mj> <1249709780.3537.14.camel@fz.local> <1249710565.28996.43.camel@mj> Content-Type: multipart/mixed; boundary="=-RQUs4rFqfgktgkQH++aq" Date: Sat, 08 Aug 2009 08:04:43 +0200 Message-Id: <1249711483.3537.16.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.5 X-Provags-ID: V01U2FsdGVkX18g+os2unkleVhOB3HlSijhzbAT78ye3H8oBpV cthIDBQoJEGj0zjHxaW2e3nVC2D4PUtSQPPdpJwTMchdrupCw/ 2g2o5QY47+5+eMj7DVliw== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] move functionality of font_path() directly to util/grub-mkconfig.in and prefer unicode.pf2 over ascii.pf2 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Aug 2009 06:03:49 -0000 --=-RQUs4rFqfgktgkQH++aq Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-RQUs4rFqfgktgkQH++aq Content-Disposition: attachment; filename="font.diff.3" Content-Type: text/plain; name="font.diff.3"; charset="UTF-8" Content-Transfer-Encoding: 7bit 2009-08-08 Felix Zielcke * 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 --=-RQUs4rFqfgktgkQH++aq--