Skip to content

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

Description

@reaktor-esakoskinen

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions