From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MZeab-0004D7-Df for mharc-grub-devel@gnu.org; Sat, 08 Aug 2009 01:35:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZeaY-0004Cz-WF for grub-devel@gnu.org; Sat, 08 Aug 2009 01:35:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZeaT-00047r-AQ for grub-devel@gnu.org; Sat, 08 Aug 2009 01:35:29 -0400 Received: from [199.232.76.173] (port=32846 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZeaT-00047f-6K for grub-devel@gnu.org; Sat, 08 Aug 2009 01:35:25 -0400 Received: from mx20.gnu.org ([199.232.41.8]:55374) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MZeaS-0000n3-0J for grub-devel@gnu.org; Sat, 08 Aug 2009 01:35:24 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MZeaQ-00077K-Iu for grub-devel@gnu.org; Sat, 08 Aug 2009 01:35:22 -0400 Received: from [85.180.53.154] (e180053154.adsl.alicedsl.de [85.180.53.154]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKv1o-1MZeaO0v7s-000pGM; Sat, 08 Aug 2009 07:35:20 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <1249708335.28996.21.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> Content-Type: multipart/mixed; boundary="=-3BZ9kW5mvB4EehBw/oOe" Date: Sat, 08 Aug 2009 07:36:20 +0200 Message-Id: <1249709780.3537.14.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.5 X-Provags-ID: V01U2FsdGVkX1+W+cZBRWPxIXl0xFCRMcE6wx0MMF4xeT4FLEo sSngOpc4YVAc3LJ5BeqZUK5Z4oQIhE94OTAQhVB6elYHhV0BZV 7hatCcdiWV6JPeP3h/bjg== X-Detected-Operating-System: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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 05:35:31 -0000 --=-3BZ9kW5mvB4EehBw/oOe Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-3BZ9kW5mvB4EehBw/oOe Content-Disposition: attachment; filename="font.diff.2" Content-Type: text/plain; name="font.diff.2"; 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. 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 --=-3BZ9kW5mvB4EehBw/oOe--