* why not support gzipped font file?
@ 2008-06-01 2:50 y.volta
2008-06-01 4:10 ` Colin D Bennett
0 siblings, 1 reply; 2+ messages in thread
From: y.volta @ 2008-06-01 2:50 UTC (permalink / raw)
To: grub-devel
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);
Best Regards!
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: why not support gzipped font file?
2008-06-01 2:50 why not support gzipped font file? y.volta
@ 2008-06-01 4:10 ` Colin D Bennett
0 siblings, 0 replies; 2+ messages in thread
From: Colin D Bennett @ 2008-06-01 4:10 UTC (permalink / raw)
To: The development of GRUB 2; +Cc: f22_storm
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-01 4:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-01 2:50 why not support gzipped font file? y.volta
2008-06-01 4:10 ` Colin D Bennett
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.