Re: Progress update on adjustment database

Craig White <[email protected]>
Newsgroups gmane.comp.fonts.freetype.devel
Message-ID <CABKSSUcwoRcUojRu=dngkS62cHQWGHdz+Q76vHGRH-GxNMcqYQ@mail.gmail.com>
I discovered there was an issue when I tried using a test font I created
with the following as one of its lookups (in ttx format):
<Lookup index="1">
        <LookupType value="1"/>
        <LookupFlag value="0"/>
        <!-- SubTableCount=1 -->
        <SingleSubst index="0">
          <Substitution in="j" out="i"/>
          <Substitution in="zero" out="one"/>
        </SingleSubst>
      </Lookup>

There is one lookup here, but 2 substitutions.  My program needs to iterate
through each substitution individually, but the
function hb_ot_layout_lookup_collect_glyphs only returns 2 unordered sets
representing all the input and output characters for this lookup.  How can
I get one substitution at a time?

On Tue, Aug 29, 2023 at 3:13 PM Werner LEMBERG <[email protected]> wrote:

>
> > As I was testing my attempt at supporting GSUB lookups, I found that
> > hb_ot_layout_lookup_collect_glyphs, is actually not what I need,
> > because I assumed that each lookup contains exactly one
> > substitution, when it actually may contain multiple.  What I really
> > need is a way to get each individual substitution.  How do I do
> > this?
>
> It's not completely clear to me what you exactly need, please give an
> example.
>
> Behdad, any idea whether HarfBuzz can help here?  Otherwise it is
> probably necessary to parse the GSUB table by ourselves, which is
> something I would like to avoid...
>
>
>     Werner
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.