grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Video subsystem draft


From: Vesa Jääskeläinen
Subject: Re: Video subsystem draft
Date: Tue, 22 Nov 2005 21:06:27 +0200
User-agent: Thunderbird 1.4.1 (Windows/20051006)

Yoshinori K. Okuji wrote:
> On Friday 18 November 2005 12:19 am, Vesa Jääskeläinen wrote:
>> What is the procedure to generate font file to font manager? Or should I
>>  just add some functionality to import VGA font to font manager.
> 
> First, download unifont.hex from <http://czyborra.com/unifont/HEADER.html>. 
> Then, convert it with util/unifont2pff.rb. If you invoke this script with no 
> argument, you can a short summary of the usage. Let's say, you store the font 
> in unifont.pff, then the command is "ruby util/unifont2pff.rb unifont.hex > 
> unifont.pff". Now you can put this generated file under /boot/grub, and load 
> it by the command "font".
> 
> You can also specify specific code ranges to unifont2pff.rb, if you need only 
> a subset of supported glyphs. This is necessary if you want to use the 
> ancient technology called "floppy".

I think it can be gzipped to fit more nicely :).. (and it seems to work
too).

But even without gzipping it, I am having some problems with it. I don't
think this is a problem in font manager.

> Honestly, I haven't tried the font manager for a long time. So I won't be 
> surprised even if I hear it is not working well. But last time I tried it (it 
> was not GRUB 2, but PUPA), it worked well and I saw a menu with Japanese 
> titles.

After something calls grub_error first read from font file fails, with
grub_file_read() == -1. Now this causes font manager to drop font from
memory. If I disable feature that I can see that first character is
invalid and others come nicely. In case of "error: ..." first 'e' is
corrupt and rest is ok. I am not sure is this really issue in grub_error
 itself but it is in sequence when problem shows up.

I can't find problem in font manager, even the offset that is tries to
seek is within limits of the file (and correct) and there is enough
bytes left in file in order to successfully complete the read.

I can send tarred version of grub2 with video subsystem if someone wants
to help on this one. I will continue to search for possible problems in
case I can pinpoint and fix it.

Is the font file using some standard format or can it's contents be
changed? Bitmap data for fonts could be placed in better order to more
easily to render it (currently I modify byte order before giving it to
glyph renderer). (My guess is that it is [P]upa [F]ont [F]ormat or file)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]