[LuaTeX, Version 1.22.0 (TeX Live 2025)
 Development id: 7673]

AFAIK, the code in luatex to handle OpenType features (in 'node' mode)
was derived from FontForge.  I've just discovered a bug (see
https://github.com/fontforge/fontforge/issues/5619) that seems to be
present in luatex, too: It misses base glyphs in the `mark2base`
feature.

Consider font `EBGaramond-Regular.otf` version 1.001 (taken from
TeXLive git repository).  `ttx` reports the following elements of the
'mark' lookup table (in 'GPOS').

```
    <FeatureList>
      ...
      <FeatureRecord index="1">
        <FeatureTag value="mark"/>
        <Feature>
          <LookupListIndex index="0" value="1"/>
        </Feature>
      </FeatureRecord>
    </FeatureList>

    <LookupList>
      ...
      <Lookup index="1">
        <LookupType value="4"/>
        <LookupFlag value="0"/>
        <MarkBasePos index="0" Format="1">
          <MarkCoverage>
            <Glyph value="gravecomb"/>
            <Glyph value="acutecomb"/>
            <Glyph value="uni0302"/>
            <Glyph value="tildecomb"/>
            ...
          </MarkCoverage>
          <BaseCoverage>
            <Glyph value="A"/>
            <Glyph value="B"/>
            <Glyph value="C"/>
            <Glyph value="D"/>
            ...
```

As can be seen, glyph 'A' is in `BaseCoverage`.

In luatex, for this particular font, the base coverage of this lookup
corresponds to

```
resources.sequences[50].steps[1].baseclasses[1]
```

However, there doesn't exist an entry for glyph 'A', i.e., there is no
entry starting with

```
resources.sequences[50].steps[1].baseclasses[1][65]...
```


    Werner

Reply via email to