On Sat, 13 Sept 2025 at 14:07, Max Chernoff via luatex <[email protected]> wrote:
> Hi Werner, > > On Sat, 2025-09-13 at 10:36 +0000, Werner LEMBERG wrote: > > AFAIK, the code in luatex to handle OpenType features (in 'node' mode) > > was derived from FontForge. > > Luigi and Hans will correct me if I'm wrong here, but I don't believe > that this is the case. > > The LuaTeX engine contains a built-in "fontloader" module, which is > indeed based off of FontForge. In the past, the ConTeXt/luaotfload font > code used this module, but at some point, this was rewritten in pure > Lua, so the current ConTeXt/luaotfload font code does not use the > "fontloader" module at all. The "fontloader" module couldn't be removed > due to backwards compatibility concerns, but as far as I'm aware, nobody > uses the "fontloader" module for anything right now. > > In luatexdir/luafontloader/src/luafflib.c ff_createcff is called by 1 writecff.c writetype1w 3142 (void ) ff_createcff(ff->ff_path, &tfm_buffer, &tfm_size); ff_get_ttc_index is called by 1 writetype0.c writetype0 77 i = fd->fm->subfont > 0 ? (fd->fm->subfont - 1): ff_get_ttc_index(fd->fm->ff_name, fd->fm->ps_name); 2 writetype2.c make_tt_subset 240 i = fd->fm->subfont > 0 ? (fd->fm->subfont - 1) : ff_get_ttc_index(fd->fm->ff_name, fd->fm->ps_name); Both uses SplineFont and ReadSplineFont inside luatexdir/luafontloader/fontforge/fontforge . The format luatex-plain calls ff_createcff, e.g. luatex --fmt=luatex-plain "tlbuild.texi" -- luigi
