From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LWWrX-0003XK-Cl for mharc-grub-devel@gnu.org; Mon, 09 Feb 2009 09:11:51 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWWrV-0003We-Rw for grub-devel@gnu.org; Mon, 09 Feb 2009 09:11:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWWrU-0003W3-EX for grub-devel@gnu.org; Mon, 09 Feb 2009 09:11:49 -0500 Received: from [199.232.76.173] (port=51321 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWWrU-0003Vx-4o for grub-devel@gnu.org; Mon, 09 Feb 2009 09:11:48 -0500 Received: from aybabtu.com ([69.60.117.155]:55887) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LWWrT-0000fu-OQ for grub-devel@gnu.org; Mon, 09 Feb 2009 09:11:48 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LWWm7-0001Tm-El for grub-devel@gnu.org; Mon, 09 Feb 2009 15:06:15 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1LWWqy-0001DG-SX for grub-devel@gnu.org; Mon, 09 Feb 2009 15:11:16 +0100 Date: Mon, 9 Feb 2009 15:11:16 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090209141116.GD4394@thorin> References: <20090208134953.00aef328@gibibit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20090208134953.00aef328@gibibit.com> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] Faster text rendering by optimizing font glyph lookup 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: Mon, 09 Feb 2009 14:11:50 -0000 On Sun, Feb 08, 2009 at 01:49:53PM -0800, Colin D Bennett wrote: > This patch greatly—*tremendously*, even, if higher-numbered Unicode > characters are used—speeds up retrieving a glyph for a particular > Unicode character. This makes text rendering in general much faster. > > My text benchmark shows the new text rendering speed is somewhere from > 2.6x to 31x of the previous speed. Basically, PFF2 font files are now > required to have the character index ordered in ascending order of code > point. > > Fonts created by 'grub-mkfont' already satisfy this requirement. Fonts > created by my old Java 'fonttool' do not, and cannot be used any longer. > > The font loader verifies that fonts fulfill the character ordering > requirement, refusing to load invalid fonts, but the primary change is > in the 'find_glyph()' function, which now uses a binary search rather > than a linear search to find the glyph. Very nice! With this patch, how does retrieving glyphs from the complete unicode font compare to retrieving glyphs (without the patch) from the ascii ascii one? Can we make unicode font the default now? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."