[HarfBuzz] About GSUB backtrack, lookahead glyph for first and last character

Richard Wordingham richard.wordingham at ntlworld.com
Fri Jan 30 00:57:19 PST 2015


On Fri, 30 Jan 2015 17:02:31 +0900
Leone Kim <lordchiwoo at gmail.com> wrote:

> Thanks for your reply, Richard. and sorry for late answer.
> That was so helpful to make a guideline for my program.
> Here's few more thing to ask.
> 
> Q1. In your reply,
> You said
> >Lookup 1 would convert it to
> >
> >x.initial y.initial z.initial a.initial g.isol
> >
> >Lookup 2 would convert it to
> >
> >x.initial y.medial z.medial a.medial g.final
> 
> but from left-right side order, when y.initial changed into y.medial
> z.initial cannot be changed cause at that time, glyph in front of
> z.ini is y.medial
> 
> so it seems like i need to add medials to lookup 2 backtrack
> coverage, is this right?

I included all forms of letter in my concept of the coverage 'letter',
so it is already done.  (I see I wasn't consistent in naming between
'letter' and 'letters'.)  So, yes, they do need to be included.  As
'letter' is likely to be a single range or two ranges of glyph indices
if only working with ASCII characters, it is probably more
micro-efficient to work with such a broad class of glyphs!  It
certainly keeps it easier to code.

> Q2. I think the problem suggested by Q1. can be fixed also by using
> "Reverse chaining contextual single" Lookup.
> So, does harfbuzz support "Reverse chaining contextual single"?

I don't use it yet in my font, but I suspect it is heavily used in some
Arabic script fonts, and in principle is not difficult, so I would be
flabbergasted if it weren't implemented in HarfBuzz.  Apple also
supports OpenType layout for Arabic.  One thing I would worry about with
it is the range of subsidiary lookup types supported. It is only
supposed to use single lookups, and I suspect that the behaviour if
that rule is not observed would be highly variable from layout engine
to layout engine.

Richard.


More information about the HarfBuzz mailing list