[Dev-luatex] OTF engine in LuaTeX

Hans Hagen pragma at wxs.nl
Mon Dec 29 01:19:06 CET 2008

Barry Schwartz wrote:

> It's probably a good idea to have many eyes looking at that code,
> because there seems to be a tendency to implement feature support
> incorrectly (including myself when I first started dealing with
> OpenType features in my hobby work). A common effect that I have seen
> with both Ant and HarfBuzz is for ligatures to be applied before
> small-caps-substitution.

well, one reason for doing it in lua is that there can be several 
solutions and i'm pretty sure that there will be; the code used in 
context mkiv can be a starting point (it will have hooks and such) but i 
know the tex community good enough to know that different solutions will 
pop up; also, since ms and adobe and whoever seem to interpret things 
differently we might end up with even more variants (apart from the need 
to deal with buggy fonts)

(btw, so far i made three variants just to get an idea of open type and 
curently i'm making a new one)

one thing that would help is simple test fonts (like the ones that idris 
makes, so that's one area where help is needed)

> It is important to keep in mind that features are not ordered; they
> are simply sets of lookup indexes. What you do is compute the union of
> all the lookups of the selected features, and then do the lookups in
> the order they appear in the lookup table.


> It concerns me a little that LuaTeX should be able to handle ligatures
> but not line-breaks in the middle of ligatures, because
> ligature-lookups in OpenType are handled just like any other
> substitution lookup. They don't require any special code different
> from that of other lookup types; from my point of view, LuaTeX
> shouldn't have to know anything about ligatures, just how to select
> and execute lookups.

not even that, you just (re)construct node lists and manipulate glyph 
nodes (which can have lig info)

> I studied the mkiv code several weeks ago but never in enough depth to
> see what was going on in there. Also I don't know much at all about
> OpenType support for non-LGC scripts.

i expect to have more final code sometime in januari


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the dev-luatex mailing list