[HarfBuzz] Lookup 6 table applys on the result of the lookup 5 table ?

Behdad Esfahbod behdad at behdad.org
Mon Sep 24 17:19:56 PDT 2012


On 09/22/2012 08:48 AM, Maison en a Pecita wrote:
> Hello Harfbuzz list, I'm embarrassed to ask you :)

Nothing is embarrassing to ask :).

> I prepared a tutorial on contextual substitutions applied to the Latin
> script: http://pecita.net/otfpoc/calt-en.xhtml
> The most important sentence is:
> "Lookup 6 table applies on the result of the lookup 5 table."
> This sentence is the result of my experiences but not of the reading of
> a standard that I've never found.

The standard is here:

http://www.microsoft.com/typography/otspec/TTOCHAP1.htm

In particular check the "Text processing with OpenType Layout fonts" section
of that page, as well as the GSUB table page.


> The consequence is that the implementation of contextual alternatives
> for Latin typeface must use these two tables together to give a correct
> result.
> Can you confirm it?

You seem a bit confused.  I'll try to explain.  There are two separate things:
specific GSUB lookup *types*.  And lookup *indices* for lookups in a
particular font.  I'm guessing that by "Lookup 6 table applies ..." you are
referring to lookup type 6.  If that's the case, that sentence does not make
much sense.

Think of it this way: each GSUB table consists of a bunch of lookups, numbers
0, 1, 2, ... sequentially.  Each lookup may be of any of the possible types
(I'm simplifying here) including type 5 and type 6 among others.

Lookups for enabled features are applied in the order of their index.  Again,
I'm simplifying here, but that's almost accurate for Latin.

HTH,
behdad

> Regards,
> Philippe Cochy



More information about the HarfBuzz mailing list