grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Faster glyph lookup by BMP index


From: Robert Millan
Subject: Re: [PATCH] Faster glyph lookup by BMP index
Date: Fri, 4 Dec 2009 22:13:35 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

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."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]