question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lookup indexes dumped, but not read

See original GitHub issue

It seems like lookup indexed are detemined by order of the lookups in the GSUB table, and not by the actual index in the attribute.

Changing this:

<GSUB>
  ... 
  <FeatureList>
    <!-- FeatureCount=1 -->
    <FeatureRecord index="0">
      <FeatureTag value="ccmp"/>
      <Feature>
        <!-- LookupCount=1 -->
        <LookupListIndex index="0" value="0"/>
      </Feature>
    </FeatureRecord>
  </FeatureList>
  <LookupList>
    <!-- LookupCount=1 -->
    <Lookup index="0">
      ...
    </Lookup>
  </LookupList>
</GSUB>

to this:

<GSUB>
  ... 
  <FeatureList>
    <!-- FeatureCount=1 -->
    <FeatureRecord index="0">
      <FeatureTag value="ccmp"/>
      <Feature>
        <!-- LookupCount=1 -->
        <LookupListIndex index="0" value="999"/>
      </Feature>
    </FeatureRecord>
  </FeatureList>
  <LookupList>
    <!-- LookupCount=1 -->
    <Lookup index="999">
      ...
    </Lookup>
  </LookupList>
</GSUB>

I would expect this to work, or see a comment indicating the indexes are not used when compiling the .ttx back to a font.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
typomancommented, Jul 31, 2019

I’m not sure if this would help, you can open the font using python and append the lookups to the end of LookupList and change the LookupCount. Then you need to find out how you can reference the lookups based on their index in this list.

from fontTools.ttLib import TTFont
f = TTFont(font_path)
print(f["GSUB"].table.LookupList.Lookup) # the list of lookups
0reactions
RoelNcommented, Oct 27, 2022

Agreed, it’d be a nice to have but I imagine resources are best spent on other parts. Thanks for considering this nonetheless!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dumping entries of a table index - database - Stack Overflow
I read the entry from another table and seek within the index of another table to retrieve soe additional information. However I don't...
Read more >
Solved: Dump search result into new index - Splunk Community
Solved: Is it possible to execute a query that merges several indexes and stores the result in another index which is then provided...
Read more >
List Index Out of Range – Python Error [Solved] - freeCodeCamp
This error generally occurs when we try to access an item in a list by using an index that doesn't exist within the...
Read more >
Does mongodump, dump all the data+indexes of the collection?
Yes, mongodump does export the indexes created on the collection, and the ... But i read in documentation like , we don't need...
Read more >
What is Short Dump Analysis and secendry index
This sorting permits fast access to the records of the table (for example using a binary search). Not all of the fields of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found