Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error #69

Open
kerams opened this issue Jun 6, 2024 · 2 comments
Open

Build error #69

kerams opened this issue Jun 6, 2024 · 2 comments

Comments

@kerams
Copy link

kerams commented Jun 6, 2024

Hey, I cloned the repo and followed the instructions to build temporal fonts, but I get

Attempting to fix OTLOffsetOverflowError ('GSUB', 'LookupIndex:', 2406, 'SubTableIndex:', None, 'ItemName:', None, 'ItemIndex:', None)
Traceback (most recent call last):
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/tables/otBase.py", line 440, in getData
    items[i] = packUShort(item.subWriter.pos - pos)
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/tables/otBase.py", line 868, in packUShort
    return struct.pack(">H", value)
struct.error: 'H' format requires 0 <= number <= 65535

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/go-noto-universal/venv_fonty/bin/pyftmerge", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/misc/loggingTools.py", line 375, in wrapper
    return func(*args, **kwds)
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/merge/__init__.py", line 244, in main
    font.save(options.output_file)
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/ttFont.py", line 216, in save
    writer_reordersTables = self._save(tmp)
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/ttFont.py", line 263, in _save
    self._writeTable(tag, writer, done, tableCache)
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/ttFont.py", line 713, in _writeTable
    tabledata = self.getTableData(tag)
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/ttFont.py", line 735, in getTableData
    return self.tables[tag].compile(self)
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/tables/otBase.py", line 158, in compile
    return self.tryPackingFontTools(writer)
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/tables/otBase.py", line 210, in tryPackingFontTools
    return writer.getAllData()
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/tables/otBase.py", line 700, in getAllData
    tableData = table.getData()
  File "/home/ubuntu/go-noto-universal/venv_fonty/lib/python3.10/site-packages/fontTools/ttLib/tables/otBase.py", line 447, in getData
    raise OTLOffsetOverflowError(overflowErrorRecord)
fontTools.ttLib.tables.otBase.OTLOffsetOverflowError: ('GSUB', 'LookupIndex:', 2406, 'SubTableIndex:', None, 'ItemName:', None, 'ItemIndex:', None)

Any clue what might be wrong?

@kerams
Copy link
Author

kerams commented Jun 10, 2024

I tracked this down to NotoSerifTibetanSubset-Regular.ttf. If I remove the font, GoNotoKurrent-Regular.ttf is generated successfully.

For GoNotoAncient.ttf to build I had to remove NotoSansPhags-Pa-Regular.ttf because it cannot be downloaded from the CDN.

@MarcelBolten
Copy link

MarcelBolten commented Jun 30, 2024

Hi @kerams

The problem with the build is that some of the upstream noto fonts are updated and got additional glyphs. This results in too many glyphs being incorporated in the final go noto universal font files during the build.
This line

struct.error: 'H' format requires 0 <= number <= 65535

in the error message indicates that the maximum number of glyphs in a ttf file is reached.

If you remove a font with enough glyphs, like you did, that will make the build work again, although without the removed font.

Regarding NotoSansPhags-Pa-Regular.ttf, it was renamed and the build tool is not up-to-date.

I am trying to customize the repo for a different project (eLabFTW, an electronic lab notebook) and have encountered similar issues. Maybe a look into my fork can help you: https://github.com/MarcelBolten/go-noto-elabftw/tree/elabftw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants