From: Colin D Bennett <colin@gibibit.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Cc: f22_storm@163.com
Subject: Re: why not support gzipped font file?
Date: Sat, 31 May 2008 21:10:05 -0700 [thread overview]
Message-ID: <20080531211005.36f45c71@gibibit.com> (raw)
In-Reply-To: <61059E33D65D48168046ABCDB120C3B5@hp2003>
[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]
On Sun, 1 Jun 2008 10:50:05 +0800 "y.volta" <f22_storm@163.com> 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
anyway.
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).
Regards,
Colin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2008-06-01 4:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-01 2:50 why not support gzipped font file? y.volta
2008-06-01 4:10 ` Colin D Bennett [this message]
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=20080531211005.36f45c71@gibibit.com \
--to=colin@gibibit.com \
--cc=f22_storm@163.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.