[Top][All Lists]

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

Re: [PATCH] Faster text rendering by optimizing font glyph lookup

From: Robert Millan
Subject: Re: [PATCH] Faster text rendering by optimizing font glyph lookup
Date: Mon, 9 Feb 2009 15:11:16 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

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

reply via email to

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