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

AttributeError: Glyph object has no attribute isVarComposite #149

Closed
RickyDaMa opened this issue Jun 11, 2024 · 3 comments
Closed

AttributeError: Glyph object has no attribute isVarComposite #149

RickyDaMa opened this issue Jun 11, 2024 · 3 comments

Comments

@RickyDaMa
Copy link

Guessing an API has shifted under you, or maybe this type wasn't expected to end up here?

Diffenator2 invocation:

diffenator2 diff --fonts-before SomeUrduFont-old.ttf --fonts-after SomeUrduFont-new.ttf --out diffenator_report -s masters

Output:

Traceback (most recent call last):
  File "./venv/bin/_diffenator", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/_diffenator.py", line 110, in main
    diff.diff_all()
  File "./venv/lib/python3.11/site-packages/diffenator2/_diffenator.py", line 38, in diff_all
    self.diff_tables()
  File "./venv/lib/python3.11/site-packages/diffenator2/_diffenator.py", line 45, in diff_tables
    self.tables = jfont.Diff(self.old_font.jFont, self.new_font.jFont)
                             ^^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/font.py", line 74, in jFont
    return jfont.TTJ(self.ttFont)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/jfont.py", line 204, in TTJ
    return _TTJ(ttFont, root)
           ^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/jfont.py", line 233, in _TTJ
    return {
           ^
  File "./venv/lib/python3.11/site-packages/diffenator2/jfont.py", line 234, in <dictcomp>
    k: _TTJ(obj[k], root)
       ^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/jfont.py", line 243, in _TTJ
    return {k: _TTJ(getattr(obj, k), root, depth=depth + 1) for k in vars(obj)}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/jfont.py", line 243, in <dictcomp>
    return {k: _TTJ(getattr(obj, k), root, depth=depth + 1) for k in vars(obj)}
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/jfont.py", line 239, in _TTJ
    return {k: _TTJ(v, root) for k, v in obj.items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/jfont.py", line 239, in <dictcomp>
    return {k: _TTJ(v, root) for k, v in obj.items()}
               ^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/jfont.py", line 228, in _TTJ
    return serialise_glyph(obj, root)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/diffenator2/jfont.py", line 169, in serialise_glyph
    elif obj.isVarComposite():
         ^^^^^^^^^^^^^^^^^^
AttributeError: 'Glyph' object has no attribute 'isVarComposite'. Did you mean: 'isComposite'?
@m4rc1e
Copy link
Collaborator

m4rc1e commented Jun 11, 2024

Thanks Ricky! I saw the title and wondered if I was suffering from amnesia. Since I have an open pr, #147 I guess I am.

@m4rc1e
Copy link
Collaborator

m4rc1e commented Jun 11, 2024

@m4rc1e m4rc1e closed this as completed Jun 11, 2024
@RickyDaMa
Copy link
Author

Cheers Marc!

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