All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] more descriptive unknown glyph picture
@ 2008-02-09 21:27 Vesa Jääskeläinen
  2008-02-09 22:06 ` Robert Millan
  2008-02-10 11:05 ` Vesa Jääskeläinen
  0 siblings, 2 replies; 6+ messages in thread
From: Vesa Jääskeläinen @ 2008-02-09 21:27 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

Hi All,

Here is a patch that changes this gray pattern for unknown glyphs to 
rounded question mark. This way user knows that something is missing :) 
(and it is easily visible).

Another story is, should we provide default fonts and/or use system 
fonts where available.

Thanks,
Vesa Jääskeläinen

[-- Attachment #2: unknown_glyph.diff --]
[-- Type: text/plain, Size: 1828 bytes --]

Index: ChangeLog
===================================================================
RCS file: /sources/grub/grub2/ChangeLog,v
retrieving revision 1.580
diff -u -p -r1.580 ChangeLog
--- ChangeLog	9 Feb 2008 12:31:10 -0000	1.580
+++ ChangeLog	9 Feb 2008 21:22:43 -0000
@@ -1,3 +1,9 @@
+2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
+
+	* font/manager.c (unknown_glyph): Added variable for unknown glyph.
+	(fill_with_default_glyph): Changed to use unknown_glyph for fill
+	pattern for unknown glyphs.
+
 2008-02-09  Robert Millan  <rmh@aybabtu.com>
 
 	* configure.ac: Probe for `help2man'.
Index: font/manager.c
===================================================================
RCS file: /sources/grub/grub2/font/manager.c,v
retrieving revision 1.11
diff -u -p -r1.11 manager.c
--- font/manager.c	21 Jul 2007 23:32:20 -0000	1.11
+++ font/manager.c	9 Feb 2008 21:22:43 -0000
@@ -40,6 +40,27 @@ struct font
 
 static struct font *font_list;
 
+/* Fill unknown glyph's with rounded question mark.  */
+static grub_uint8_t unknown_glyph[16] =
+{       /* 76543210 */
+  0x7C, /*  ooooo   */
+  0x82, /* o     o  */
+  0xBA, /* o ooo o  */
+  0xAA, /* o o o o  */
+  0xAA, /* o o o o  */
+  0x8A, /* o   o o  */
+  0x9A, /* o  oo o  */
+  0x92, /* o  o  o  */
+  0x92, /* o  o  o  */
+  0x92, /* o  o  o  */
+  0x92, /* o  o  o  */
+  0x82, /* o     o  */
+  0x92, /* o  o  o  */
+  0x82, /* o     o  */
+  0x7C, /*  ooooo   */
+  0x00  /*          */
+};
+
 static int
 add_font (const char *filename)
 {
@@ -154,8 +175,9 @@ fill_with_default_glyph (grub_font_glyph
 {
   unsigned i;
 
+  /* Use pre-defined pattern to fill unknown glyphs.  */
   for (i = 0; i < 16; i++)
-    glyph->bitmap[i] = (i & 1) ? 0x55 : 0xaa;
+    glyph->bitmap[i] = unknown_glyph[i];
 
   glyph->char_width = 1;
   glyph->width = glyph->char_width * 8;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] more descriptive unknown glyph picture
  2008-02-09 21:27 [patch] more descriptive unknown glyph picture Vesa Jääskeläinen
@ 2008-02-09 22:06 ` Robert Millan
  2008-02-09 23:01   ` Pavel Roskin
  2008-02-10 11:05 ` Vesa Jääskeläinen
  1 sibling, 1 reply; 6+ messages in thread
From: Robert Millan @ 2008-02-09 22:06 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, Feb 09, 2008 at 11:27:22PM +0200, Vesa Jääskeläinen wrote:
> Hi All,
> 
> Here is a patch that changes this gray pattern for unknown glyphs to 
> rounded question mark. This way user knows that something is missing :) 
> (and it is easily visible).
> 
> Another story is, should we provide default fonts and/or use system 
> fonts where available.

I think using system fonts is fine.  Current update-grub has logic to detect
them, and enable them when present.  It checks (via grub-probe) that GRUB will
be able to read them before doing so.  Additionaly, the grub.cfg it generates
will instruct GRUB to fallback sanely to console when fonts aren't readable.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] more descriptive unknown glyph picture
  2008-02-09 22:06 ` Robert Millan
@ 2008-02-09 23:01   ` Pavel Roskin
  2008-02-10 11:06     ` Vesa Jääskeläinen
  2008-02-10 12:11     ` Robert Millan
  0 siblings, 2 replies; 6+ messages in thread
From: Pavel Roskin @ 2008-02-09 23:01 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, 2008-02-09 at 23:06 +0100, Robert Millan wrote:

> I think using system fonts is fine.  Current update-grub has logic to detect
> them, and enable them when present.  It checks (via grub-probe) that GRUB will
> be able to read them before doing so.  Additionaly, the grub.cfg it generates
> will instruct GRUB to fallback sanely to console when fonts aren't readable.

You probably misunderstand.  System fonts are located in BIOS.  I think
it might also be possible to read them back from a VGA compatible card.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] more descriptive unknown glyph picture
  2008-02-09 21:27 [patch] more descriptive unknown glyph picture Vesa Jääskeläinen
  2008-02-09 22:06 ` Robert Millan
@ 2008-02-10 11:05 ` Vesa Jääskeläinen
  1 sibling, 0 replies; 6+ messages in thread
From: Vesa Jääskeläinen @ 2008-02-10 11:05 UTC (permalink / raw)
  To: The development of GRUB 2

Vesa Jääskeläinen wrote:
> Here is a patch that changes this gray pattern for unknown glyphs to 
> rounded question mark. This way user knows that something is missing :) 
> (and it is easily visible).

Committed.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] more descriptive unknown glyph picture
  2008-02-09 23:01   ` Pavel Roskin
@ 2008-02-10 11:06     ` Vesa Jääskeläinen
  2008-02-10 12:11     ` Robert Millan
  1 sibling, 0 replies; 6+ messages in thread
From: Vesa Jääskeläinen @ 2008-02-10 11:06 UTC (permalink / raw)
  To: The development of GRUB 2

Pavel Roskin wrote:
> On Sat, 2008-02-09 at 23:06 +0100, Robert Millan wrote:
> 
>> I think using system fonts is fine.  Current update-grub has logic to detect
>> them, and enable them when present.  It checks (via grub-probe) that GRUB will
>> be able to read them before doing so.  Additionaly, the grub.cfg it generates
>> will instruct GRUB to fallback sanely to console when fonts aren't readable.
> 
> You probably misunderstand.  System fonts are located in BIOS.  I think
> it might also be possible to read them back from a VGA compatible card.

This is what I was pointing to. But there are most likely systems where 
this font information is stored elsewhere. And actually VGA font sizes 
are usually too small for larger displays. (and so is ours)




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] more descriptive unknown glyph picture
  2008-02-09 23:01   ` Pavel Roskin
  2008-02-10 11:06     ` Vesa Jääskeläinen
@ 2008-02-10 12:11     ` Robert Millan
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Millan @ 2008-02-10 12:11 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, Feb 09, 2008 at 06:01:31PM -0500, Pavel Roskin wrote:
> On Sat, 2008-02-09 at 23:06 +0100, Robert Millan wrote:
> 
> > I think using system fonts is fine.  Current update-grub has logic to detect
> > them, and enable them when present.  It checks (via grub-probe) that GRUB will
> > be able to read them before doing so.  Additionaly, the grub.cfg it generates
> > will instruct GRUB to fallback sanely to console when fonts aren't readable.
> 
> You probably misunderstand.  System fonts are located in BIOS.  I think
> it might also be possible to read them back from a VGA compatible card.

Sorry, I wasn't very explicit.  When I said system fonts I meant e.g. unicode.pff.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-10 12:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-09 21:27 [patch] more descriptive unknown glyph picture Vesa Jääskeläinen
2008-02-09 22:06 ` Robert Millan
2008-02-09 23:01   ` Pavel Roskin
2008-02-10 11:06     ` Vesa Jääskeläinen
2008-02-10 12:11     ` Robert Millan
2008-02-10 11:05 ` Vesa Jääskeläinen

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.