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

Can't use the /download URLs to fetch static font files #7481

Closed
reaktor-esakoskinen opened this issue Mar 28, 2024 · 3 comments
Closed

Can't use the /download URLs to fetch static font files #7481

reaktor-esakoskinen opened this issue Mar 28, 2024 · 3 comments

Comments

@reaktor-esakoskinen
Copy link

reaktor-esakoskinen commented Mar 28, 2024

Describe the issue

Hi! Our team is relying on accessing font files using the https://fonts.google.com/download?family=Noto+Sans+SC URL format. The URLs used to point directly to a ZIP file, which we download with wget, unzip, and load into the system as part of the CI process.

However, now that the page returns HTML that initiates the download with JavaScript, it's not clear how we should get access to the files programmatically. I scoured the documentation but couldn't find any indication of download paths for static font resources, only different options for using webfonts.

To Reproduce

  1. wget https://fonts.google.com/download?family=Noto+Sans+SC -O noto-sans-sc.zip
  2. unzip noto-sans-sc.zip
  3. Unzip fails since the downloaded file is now HTML instead of a ZIP archive.

Expected behavior

We've relied on the (currently undocumented?) /download URLs to return single files instead of HTML pages.

Additional context

The base image for our container is public.ecr.aws/lambda/nodejs:18. Can also be reproduced on recent Linux and macOS versions (although you may need to download the unzip utility first, e.g. yum install unzip).

@rathboma
Copy link

This is also breaking my build for the Beekeeper Studio docs - https://github.com/beekeeper-studio/beekeeper-studio/actions/runs/8469768189/job/23205855650, would love for this change to be reverted!

@garretrieger
Copy link
Member

garretrieger commented Mar 28, 2024

fonts.google.com/download (and all other endpoints under fonts.google.com/*) are internal and not meant for external use as they may change at any time without warning. If you need access to font metadata and the font binaries you can instead use the public developer api: https://developers.google.com/fonts/docs/developer_api

ThewBear added a commit to ThewBear/11ty-www.thewdhanat.com that referenced this issue Mar 31, 2024
@reaktor-esakoskinen
Copy link
Author

Thanks for the info. We decided to fix this by adding the font resources into our repo and COPYing them in the Dockerfile. Was much easier than handling a dynamic list of font families, at the cost of a slightly larger repo 😅

nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Apr 11, 2024
This isn't available since Google removed the static downloads,
we'll need another approach to handle this

Refs google/fonts#7481
Refs qgis#57070
nyalldawson added a commit to qgis/QGIS that referenced this issue Apr 11, 2024
This isn't available since Google removed the static downloads,
we'll need another approach to handle this

Refs google/fonts#7481
Refs #57070
qgis-bot pushed a commit to qgis/QGIS that referenced this issue Apr 11, 2024
This isn't available since Google removed the static downloads,
we'll need another approach to handle this

Refs google/fonts#7481
Refs #57070
qgis-bot pushed a commit to qgis/QGIS that referenced this issue Apr 11, 2024
This isn't available since Google removed the static downloads,
we'll need another approach to handle this

Refs google/fonts#7481
Refs #57070
nyalldawson added a commit to qgis/QGIS that referenced this issue Apr 15, 2024
This isn't available since Google removed the static downloads,
we'll need another approach to handle this

Refs google/fonts#7481
Refs #57070
nyalldawson added a commit to qgis/QGIS that referenced this issue Apr 15, 2024
This isn't available since Google removed the static downloads,
we'll need another approach to handle this

Refs google/fonts#7481
Refs #57070
brechtm added a commit to brechtm/rinohtype that referenced this issue Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants