[luatex] kerning/ligature callback problem with ltluatex

David Carlisle d.p.carlisle at gmail.com
Fri Jul 28 12:40:02 CEST 2023


It works as you expect with

\documentclass{article}
\usepackage[OT1]{fontenc}
\directlua{dofile('latex.lua')}

\begin{document}
ffi
\end{document}


which is, I guess, equivalent to your plain tex trial, using tfm fonts and
"classic" tfm ligature data.

If you use OpenType fonts things appear to be  different (not that the
manual makes that clear:-)

David


On Fri, 28 Jul 2023 at 09:39, Werner LEMBERG <wl at gnu.org> wrote:

>
> Consider the following lua file `latex.lua`
>
> ```
> function test(head, tail)
>   node.ligaturing(head)
>   io.write('\nafter ligaturing callback\n')
> end
>
> luatexbase.add_to_callback('ligaturing', test, 'test')
> ```
>
> together with this simple LaTeX input file
>
> ```
> \documentclass{article}
>
> \directlua{dofile('latex.lua')}
>
> \begin{document}
> ffi
> \end{document}
> ```
>
> If I run this with `lualatex latex.tex`, I see 'after ligaturing
> callback' in the logfile and a proper `ffi` ligature in the PDF.
>
> However, if I comment out the `node.ligaturing(head)` line and run
> this command, I *also* get the `ffi` ligature, which seems wrong to me
> – I'm replacing the 'ligaturing' callback with something of my own, so
> why is `node.ligaturing` (or rather its internal luatex version) still
> executed?
>
> What am I missing?  BTW, if I do something similar with plain TeX and
> `callback.register`, everything works as expected.
>
>
>     Werner
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20230728/9e3d7fa1/attachment.htm>


More information about the luatex mailing list.