On Mon, Dec 20, 2010 at 12:59:45PM +0100, Paul Isambert wrote: > Selon Arthur Reutenauer <arthur.reutena...@normalesup.org>: > > > > Incidentally, does anyone know whether there is a LuaTeX version of the > > > XeTeXintercharclass behaviour that would let this package be rewritten > > > for LuaTeX with minimal effort? > > > > Paul Isambert has written code to that effect, but I'm not sure he has > > made it into a package yet. > > > I haven't indeed. It's quite low on my priority list, all the more as > mimicking > interchartoks isn't totally possible in LuaTeX, although the most significant > part of the mechanism can be reproduced. > > Anyway judging from what I understand Michiel's package does, an > interchartoks-like code in LuaTeX won't work, because it'll really be an > ``inter-node'' mechanism, and (glyph) nodes already have their fonts attached > to > them, whereas the package is supposed to change fonts. > > The solution would rather be: get the nodes as soon as possible, e.g. in the > ligaturing callback, and set the font number for each node according to its > unicode value. That means no such thing as "\fontspec{A font}" is usable here; > instead, you must go low-level and grab the fonts by their numbers. Such > numbers > can be retrieved from the control sequences passed to the \font primitive with > Lua's font.id(<name>). An extension to fontspec would be infinitely simpler > than > an independent package.
I long had that on my todo list, but I'm yet to figure out a proper user interface for it; one needs to take care of different font styles, optical sizes etc. e.g. English ARABIC {\it english ARABIC} should work and get the Arabic text assigned the proper italic font and so on. The code at lua end is quit trivial, once the script->font mapping is defined which is actually the tricky part. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer -------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex