[Top][All Lists]

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

Re: why not support gzipped font file?

From: Colin D Bennett
Subject: Re: why not support gzipped font file?
Date: Sat, 31 May 2008 21:10:05 -0700

On Sun, 1 Jun 2008 10:50:05 +0800 "y.volta" <address@hidden> wrote:
> Hi,
>     I noticed that, /font/manager.c:51:
>                   file = grub_file_open (filename); 
>     so, we can only use pure font file, this will need more than 1MB
> bytes for font file, and more time to load it into memory. 
>     well, how about change it to:
>                   file = grub_gzfile_open (filename, 1); 

Are you noticing that it is slow to load the font into memory?
Currently the whole font is not loaded at once, but rather the glyphs
are loaded on demand, as they are needed, so opening the font file
should be fairly fast.

You probably don't want to spend time working on the existing GRUB 2
'PFF' font code since I am working on creating a new font file format
for GRUB, and I will remove the limitation on size of 16 pixels wide.

Using gzip on the whole file is not a great option since we want random
access to the file contents since we only need to read in the glyphs
that are used, which in general, for a font covering most of Unicode,
is a very small proportion of the characters in the file.

We could find ways to compress the font, but simply gzipping the font
file is not a good option when you don't need to read the whole font

Perhaps there are better compression techniques we can use for the font
that will support random access to the font, but we should determine
whether there is a need for compression (or if compression will provide
a performance benefit).


Attachment: signature.asc
Description: PGP signature

reply via email to

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