fonttools / fontbakery

🧁 A font quality assurance tool for everyone
https://fontbakery.readthedocs.io
Apache License 2.0
548 stars 99 forks source link

Fix instances_in_order for single-axis fonts #4624

Closed simoncozens closed 6 months ago

simoncozens commented 6 months ago

Description

instances_in_order separates the instances based on what isn't in the weight axis; if there is only a weight axis, it fails with this error:

    ERROR Failed with IndexError: list index out of range

            File
          "/opt/homebrew/lib/python3.11/site-packages/fontbakery/checkrunner.
          ", line 213, in _run_check
              subresults = list(subresults)
                           ^^^^^^^^^^^^^^^^
            File
          "/opt/homebrew/lib/python3.11/site-packages/fontbakery/checks/googl
          onts/varfont.py", line 663, in
          com_google_fonts_check_varfont_instances_in_order
              sublists[-1].append(coord)
              ~~~~~~~~^^^^

          [code: failed-check]

This fixes it.

Checklist

felipesanches commented 6 months ago

I already fixed this at PR #4628