Hi Max,

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.

You can never predict what is not used ... it's also why luatex is now not extended / improved any more ... expectations.

But indeed you're right (as usual). At some point I wanted to get around heuristics that libraries like ff have and are hard to bypass. I also wanted to read some tables that ff didn't read. So I just went for a lua based reader. That also made it easier to move on to luametatex where indeed that ff library is not present at all (in fact, no loading code is present, we also read tfm etc in lua). It also performs better.

Wrt to this somewhat weird thread about marks and fixing a cached font then to be recached (likely less efficient) while it can be done runtime (at no cost and efficiently) ... assuming that slot 50 has something is a bad idea ... in my case (context) it's in slot 53 and even then one has to descend one level more to reach the hit

53      1       1       65      335     -30
53      1       2       65      363     675
53      1       3       65      0       0
53      1       4       65      0       0

with

    local t = fonts.hashes.identifiers[true]
    local i = 1
    while true do
        local s = t.resources.sequences[i]
        if not s then
            break
        elseif s.type == "gpos_mark2base" then
            local si = s.steps
            if si then
                for j=1,#si do
                    local b = si[j].baseclasses
                    if b then
                        for k=1,#b do
                            local a = b[k][65]
                            if a then
                                print(i,j,k,65,a[1],a[2])
                            end
                        end
                    end
                end
            end
        end
        i = i + 1
    end

the only reason i checked it that there was this "discoverd a bug" mentioning so i checked the code and so it looked like i wasted over an hour

thanks for dealing with this

Hans

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

Reply via email to