All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin D Bennett <colin@gibibit.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] GSoC #10 new font engine (UTF-8 support+bugfix)
Date: Mon, 22 Dec 2008 09:14:43 -0800	[thread overview]
Message-ID: <20081222091443.7280e623@gibibit.com> (raw)
In-Reply-To: <493ADE06.7080001@nic.fi>

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

On Sat, 06 Dec 2008 22:18:14 +0200
Vesa Jääskeläinen <chaac@nic.fi> wrote:

> Colin D Bennett wrote:
> > Update: 
> > 
> > I fixed an error pointed out to me by Y.Volta: 
> > In grub_font_get(), if no fonts are loaded, a null pointer is
> > dereferenced.  This is fixed in the attached patch.
> > 
> > The grub_font_get() function now returns a dummy font object (a
> > statically allocated font object with no characters) so that
> > callers of grub_font_get() can be assured that the return value
> > will never be NULL.  If no fonts are loaded, then the "unknown
> > glyph" will be used for all characters, but it will be safe.
> 
> Hi Colin,
> 
> I applied this patch against SVN today and tried it out. And noticed
> that gfxterm gets a bit "broken" after this. Was this the thing that I
> promised to look at :) ? Or was my merge just incomplete?

There are two problems with gfxterm now:

1.  unifont has problems rendering glyphs: they seem to be rendered
    too wide (maybe), and the cursor ends up being drawn after each
    character resulting in t_e_x_t_ _t_h_a_t_ _l_o_o_k_s like this.

2.  With fonts that otherwise work (i.e. "Fixed 10" for me), sometimes
    a few random junk characters with weird background/foreground
    colors show up in gfxterm -- mainly when it is first set as the
    terminal, leading me to think that there is some uninitialized
    memory.


> Videotest was fine however. (or how fine it can be with just
> unifont.bdf)

I should look closely at unifont.bdf and the .pf2 conversion and see
why GRUB is rendering it weirdly in gfxterm.

> After:
> loadfont /boot/grub/unifont.pf2
> 
> lsfonts gives:
> Loaded fonts:
> Unknown -1
> 
> Is this expected?

Yes, since there is no 'POINT_SIZE' or 'FAMILY_NAME' attribute in the
unifont.bdf file.  I added these manually, and it then showed up
properly in the lsfonts listing (and can then be specified using the
name/size in GRUB).

--- gnu-unifont-2008-04-06.bdf	2008-12-22 08:48:00.000000000
-0800 +++ gnu-unifont-2008-04-06_tagged.bdf	2008-12-22
09:10:22.000000000 -0800 @@ -1,5 +1,8 @@
 STARTFONT 2.1
 FONT -gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1
+FAMILY_NAME "unifont"
+WEIGHT_NAME "medium"
+POINT_SIZE 100
 SIZE 16 75 75
 FONTBOUNDINGBOX 16 16 0 -2
 STARTPROPERTIES 3

The font converter should probably fall back on the file's name and the
font's pixel size if such specifications are missing in the BDF file.


Sorry for the delay getting back to you; now that the font patches are
going in, I will be ready to continue work on submitting the graphical
menu system patches.  I've received e-mails from a number of people who
have found my project web site and want to try out the graphical menu,
and are asking when it will be merged into GRUB.

Regards,
Colin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-12-22 17:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01 16:27 [PATCH] GSoC #10 new font engine Colin D Bennett
2008-10-05  4:46 ` [PATCH] GSoC #10 new font engine (vs r1885) Colin D Bennett
2008-10-05  8:50   ` Vesa Jääskeläinen
2008-10-30 19:11     ` [PATCH] GSoC #10 new font engine (UTF-8 support) Colin D Bennett
2008-10-31  3:57       ` [PATCH] GSoC #10 new font engine (UTF-8 support+bugfix) Colin D Bennett
2008-10-31 18:31         ` Matt Sturgeon
2008-10-31 19:50           ` Colin D Bennett
2008-11-04 20:19             ` Vesa Jääskeläinen
2008-11-04 20:31               ` Robert Millan
2008-11-04 20:52                 ` Colin D Bennett
2008-12-06 20:18         ` Vesa Jääskeläinen
2008-12-22 17:14           ` Colin D Bennett [this message]
2008-12-23 18:39             ` Vesa Jääskeläinen
2008-12-24  1:17               ` Colin D Bennett
2008-12-28  0:34                 ` Vesa Jääskeläinen
2008-12-28  0:35                   ` Vesa Jääskeläinen
2009-01-02 15:26                     ` Vesa Jääskeläinen
2008-12-28  8:44                   ` Arthur Marsh
2009-01-02 22:44                   ` Jerone Young
2009-01-02 22:57                     ` Vesa Jääskeläinen
2009-01-03  4:52                       ` Bean
2009-01-03  7:30                         ` Colin D Bennett
2009-01-03 16:45                     ` Colin D Bennett
2009-01-03 16:54                       ` Vesa Jääskeläinen
2009-01-05  5:05                       ` Jerone Young
2009-01-05  7:59                         ` Colin D Bennett
2009-01-05 13:29                           ` Jerone Young

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=20081222091443.7280e623@gibibit.com \
    --to=colin@gibibit.com \
    --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.