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

port to ufonormalizer-0.6.1 (from 0.6.0) #1418

Closed
trofi opened this issue Oct 15, 2021 · 3 comments · Fixed by #1423
Closed

port to ufonormalizer-0.6.1 (from 0.6.0) #1418

trofi opened this issue Oct 15, 2021 · 3 comments · Fixed by #1423

Comments

@trofi
Copy link
Contributor

trofi commented Oct 15, 2021

In NixOS/nixpkgs#141423 NixOS noticed that after update of ufonormalizer from 0.6.0 to 0.6.1 some tests started failing as

=================================== FAILURES ===================================
___________________ test_ufo3_masters[args0-ufo3regular.ufo] ___________________

args = ['_0'], ufo_filename = 'ufo3regular.ufo'

    @pytest.mark.parametrize('args, ufo_filename', [
        (['_0'], 'ufo3regular.ufo'),  # hint/remove overlap/normalize/round
        (['_1'], 'ufo3regular.ufo'),  # for testing instance removal
        (['_2', 'a', 'c', 'n'], 'ufo3medium.ufo'),  # round only
        (['_3', 'a', '=ufo-version', '_2'], 'ufo3semibold.ufo'),  # no hint UFO v2
    ])
    def test_ufo3_masters(args, ufo_filename):
        runner(['-t', TOOL, '-o', 'd',
                f'_{get_input_path("ufo3.designspace")}', 'i'] + args)
        expected_path = _get_output_path(ufo_filename, 'expected_output')
        actual_path = _get_output_path(ufo_filename, 'temp_output')
>       assert differ([expected_path, actual_path])
E       AssertionError: assert False
E        +  where False = differ(['/build/afdko-3.5.1/tests/makeinstancesufo_data/expected_output/ufo3regular.ufo', '/build/afdko-3.5.1/tests/makeinstancesufo_data/temp_output/ufo3regular.ufo'])

tests/makeinstancesufo_test.py:133: AssertionError
----------------------------- Captured stderr call -----------------------------
WARNING:afdko.makeinstancesufo:Instance at index 0 has no 'familyname' attribute.
WARNING:afdko.makeinstancesufo:Instance at index 0 has no 'postscriptfontname' attribute.
WARNING:afdko.makeinstancesufo:Instance at index 0 has no 'stylename' attribute.

The change looks minor, but I'm not sure why it breaks afdko: unified-font-object/ufoNormalizer@0.6.0...0.6.1

Would it make sense to port to most recent 0.6.1?

Thanks!

@trofi
Copy link
Contributor Author

trofi commented Oct 15, 2021

Bisected down to unified-font-object/ufoNormalizer@2d4c06c "Do not write empty keys"

@frankrolf
Copy link
Member

I think this would be a case where the test data needs changing.

@frankrolf
Copy link
Member

Background:
My fix to ufonormalizer no longer writes the layerinfo.plist lib key if it’s empty, and consequently also does not write an empty layerinfo.plist file.
The test failures could be fixed by just just removing layerinfo.plist from the glyphs/ and processedGlyphs/ directories (in the “expected output” UFOs)

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

Successfully merging a pull request may close this issue.

2 participants