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

remote_styles is dead #4837

Closed
simoncozens opened this issue Sep 19, 2024 · 2 comments
Closed

remote_styles is dead #4837

simoncozens opened this issue Sep 19, 2024 · 2 comments

Comments

@simoncozens
Copy link
Collaborator

The remote_styles condition uses https://fonts.google.com/download/list?family={} to get a manifest of filenames and URLs to download the font family, but this URL no longer provides such a list, so anything which calls remote_styles crashes with an error:

  File "/Users/simon/others-repos/fontbakery/Lib/fontbakery/checks/googlefonts/conditions.py", line 311,
in regular_remote_style
    remote_styles = font.remote_styles
                    ^^^^^^^^^^^^^^^^^^
  File
"/usr/local/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/functools.p
y", line 993, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  File "/Users/simon/others-repos/fontbakery/Lib/fontbakery/checks/googlefonts/conditions.py", line 287,
in remote_styles
    for item in data["manifest"]["fileRefs"]:
                ~~~~^^^^^^^^^^^^
KeyError: 'manifest'

Suggest looking at how gftools.utils.download_family_from_Google_Fonts works. Although it seems to use the same URL. Um. Don't know.

@m4rc1e
Copy link
Collaborator

m4rc1e commented Sep 19, 2024

Currently improving remote_styles in #4836

@simoncozens
Copy link
Collaborator Author

This is actually #4088 in disguise.

@simoncozens simoncozens closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
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