From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K2etb-00053s-8y for mharc-grub-devel@gnu.org; Sun, 01 Jun 2008 00:10:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2etZ-00052K-SF for grub-devel@gnu.org; Sun, 01 Jun 2008 00:10:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2etZ-00051L-81 for grub-devel@gnu.org; Sun, 01 Jun 2008 00:10:13 -0400 Received: from [199.232.76.173] (port=42633 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2etY-000516-Vg for grub-devel@gnu.org; Sun, 01 Jun 2008 00:10:13 -0400 Received: from gateway16.websitewelcome.com ([69.93.179.8]:58126) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1K2etY-0007Ga-Gu for grub-devel@gnu.org; Sun, 01 Jun 2008 00:10:12 -0400 Received: (qmail 9541 invoked from network); 1 Jun 2008 04:12:58 -0000 Received: from gator297.hostgator.com (74.53.228.114) by gateway16.websitewelcome.com with SMTP; 1 Jun 2008 04:12:58 -0000 Received: from c-67-185-142-228.hsd1.wa.comcast.net ([67.185.142.228]:41212 helo=localhost) by gator297.hostgator.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1K2etS-0000Ba-98; Sat, 31 May 2008 23:10:06 -0500 Date: Sat, 31 May 2008 21:10:05 -0700 From: Colin D Bennett To: The development of GRUB 2 Message-ID: <20080531211005.36f45c71@gibibit.com> In-Reply-To: <61059E33D65D48168046ABCDB120C3B5@hp2003> References: <61059E33D65D48168046ABCDB120C3B5@hp2003> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.9; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/e5UOoj9ImmzjNlQDj6JA9x/"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator297.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gibibit.com X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Cc: f22_storm@163.com Subject: Re: why not support gzipped font file? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 04:10:14 -0000 --Sig_/e5UOoj9ImmzjNlQDj6JA9x/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 1 Jun 2008 10:50:05 +0800 "y.volta" wrote: > Hi, >=20 > I noticed that, /font/manager.c:51: >=20 > file =3D grub_file_open (filename);=20 >=20 > 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.=20 >=20 > well, how about change it to: >=20 > file =3D grub_gzfile_open (filename, 1);=20 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 --Sig_/e5UOoj9ImmzjNlQDj6JA9x/ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkhCISAACgkQokx8fzcGbYcDWwCfdH5BMe7SnsN+09rB6g0Rxi/3 Db4An23yM/NttmGjy50rmv5ZXUTeIAGY =XvLn -----END PGP SIGNATURE----- --Sig_/e5UOoj9ImmzjNlQDj6JA9x/--