# Hebrew words causes strange errors with ConTeXt IV / LuaTeX

I am experiencing strange problems with ConTeXt IV / LuaTeX. I have some hebrew words which continues to throw following errors: error: /usr/share/texmf/tex/context/base/font-otn.lua:1809: attempt to index local 'chainlookup' (a nil value) My tools are from Adam Reviczky's Ubuntu PPAs (links can be found here) and I just updated them to make sure I have the newest set.

Here is my test file. Cardo font is available from here. Unfortunately the link for 0.99 version was dead so there may be different errors with newer version. I also tried with Ezra SIL font which is available for Ubuntu as ttf-sil-ezra package and actually got more errors. With older standalone installation of ConTeXt IV this works.

\definefontfeature[hebrew][arabic][script=hebr]
\definefont[hebrew][name:cardo*hebrew]
\starttext
\textdir TRT
\hebrew

סוּסַ֫יִם   % This causes error.
סוּסַ֫יִ    % If I remove one character it works again. (Error with Ezra SIL)
ם   % However that character by itself does not cause error.

סוּסָתַ֫יִם % This causes error.
סוּסָתַ֫יִ  % If I remove one character it works again. (Error with Ezra SIL)
ם   % However that character by itself does not cause error.

סוּסָֽתְךָ  % This causes error.
סוּסָתְךָ   % If I remove one character it works again.
ֽ   % However that character by itself does not cause error.

\stoptext

-
ConTeXt bug, report it to the developers. – Khaled Hosny Jan 14 '12 at 12:49

I got confirmation from the developer few days ago that this is indeed a bug. Today I upgraded my tools and problem is now fixed.

-

I've had moderate success with Hebrew in ConTeXt (MkIV) using the ttf-sil-ezra package. Let me know if the following works for you.

\definefontfeature[hebrew][arabic][script=hebr]
\definefont[hebrew][name:ezrasil]

\starttext

Here is some text.

\textdir TRT
\hebrew

בָּיִת שֶל אָבִי

There was some text.

\textdir TLT

Whoops, there was some text.

\textdir TRT
\hebrew
\hebrewAlef \hebrewBet  \hebrewGimel

\stoptext

-