From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NGfTG-0001dd-RC for mharc-grub-devel@gnu.org; Fri, 04 Dec 2009 16:13:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGfTE-0001d8-93 for grub-devel@gnu.org; Fri, 04 Dec 2009 16:13:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGfT8-0001cW-T2 for grub-devel@gnu.org; Fri, 04 Dec 2009 16:13:43 -0500 Received: from [199.232.76.173] (port=48991 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGfT8-0001cT-Ih for grub-devel@gnu.org; Fri, 04 Dec 2009 16:13:38 -0500 Received: from xvm-190-8.ghst.net ([217.70.190.8]:59008 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NGfT8-00047M-Bs for grub-devel@gnu.org; Fri, 04 Dec 2009 16:13:38 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1NGfT6-0003iG-6X for grub-devel@gnu.org; Fri, 04 Dec 2009 22:13:36 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1NGfT5-0000aa-9D for grub-devel@gnu.org; Fri, 04 Dec 2009 22:13:35 +0100 Date: Fri, 4 Dec 2009 22:13:35 +0100 From: Robert Millan To: The development of GNU GRUB Message-ID: <20091204211335.GI1528@thorin> References: <4B12853E.70001@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4B12853E.70001@gmail.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.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] Faster glyph lookup by BMP index X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2009 21:13:44 -0000 On Sun, Nov 29, 2009 at 03:29:18PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Hello. Basic Multilingual Plane is range of Unicode characters in > 0-65535 and it contains most of the characters needed by most of the > languages of the world. By keeping an array with pointers to such > characters at the cost of 128KiB per font we can almost instantenously > lookup characters which are likely to be used in grub. Available in > experimental Seems fine (for trunk as well), just one thing: > + grub_memset (font->bmp_idx, 0xff, 0x10000 * sizeof (grub_uint16_t)); > [...] > + if (entry->code < 0x10000) > [...] > + /* Use BMP index if possible. */ > + if (code < 0x10000) > + { > + if (font->bmp_idx[code] == 0xffff) Could these be macroified? Makes it harder to do mistakes in the future. -- 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."