Visitar URL original
Error building COLR v0 OTF font · Issue #1028 · googlefonts/gftools · GitHub
Skip to content

Error building COLR v0 OTF font #1028

Open

Description

@gredler

The changes in #610 assume that the font has a "glyf" table, which OTF fonts do not.

gftools builder sources/config.yaml

[...]

[42/60] fix
FAILED: ../fonts/otf/MyFont-ExtraBold.otf 
/home/user/myfont/.venv/bin/python3 -m gftools.builder.jobrunner gftools-fix-font -o ../fonts/otf/MyFont-ExtraBold.otf  /tmp/tmpf2k52f6_ 

Command failed:
gftools-fix-font -o ../fonts/otf/MyFont-ExtraBold.otf /tmp/tmpf2k52f6_

INFO:gftools.fix:Updated license strings
INFO:gftools.fix:Added GASP and prep tables for unhinted font
Traceback (most recent call last):
  File "/home/user/myfont/.venv/bin/gftools-fix-font", line 8, in <module>
    sys.exit(main())
  File "/home/user/myfont/.venv/lib/python3.10/site-packages/gftools/scripts/fix_font.py", line 50, in main
    font = fix_font(font, args.include_source_fixes, args.rename_family, axis_dflts)
  File "/home/user/myfont/.venv/lib/python3.10/site-packages/gftools/fix.py", line 914, in fix_font
    result = fixer(fixed_font)
  File "/home/user/myfont/.venv/lib/python3.10/site-packages/gftools/fix.py", line 808, in fix_colr_font
    return fix_colr_v0_gid1(ttfont)
  File "/home/user/myfont/.venv/lib/python3.10/site-packages/gftools/fix.py", line 702, in fix_colr_v0_gid1
    glyf_table = ttfont["glyf"]
  File "/home/user/myfont/.venv/lib/python3.10/site-packages/fontTools/ttLib/ttFont.py", line 455, in __getitem__
    table = self._readTable(tag)
  File "/home/user/myfont/.venv/lib/python3.10/site-packages/fontTools/ttLib/ttFont.py", line 462, in _readTable
    data = self.reader[tag]
  File "/home/user/myfont/.venv/lib/python3.10/site-packages/fontTools/ttLib/sfnt.py", line 108, in __getitem__
    entry = self.tables[Tag(tag)]
KeyError: 'glyf'

Activity

  1. gredler commented on Sep 16, 2024

    @gredler
    Author

    Is there a way to configure the tool to skip some fixes (like this one)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions