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

Saving variable font results in static font #788

Open
Materuilist opened this issue Jan 28, 2025 · 0 comments
Open

Saving variable font results in static font #788

Materuilist opened this issue Jan 28, 2025 · 0 comments

Comments

@Materuilist
Copy link

Hello! Enjoying your package in multiple projects, but there is 1 blocking issue for me here.
It can be demonstrated with this simple code block in browser environment (similar flow doesnt work in Node.js as well):

async function downloadFont() {
    if (variableFontFile) {
      const url = URL.createObjectURL(variableFontFile)

      const font = await opentype.load(url)

      font.download()

      URL.revokeObjectURL(url)
    }
  }

If url points to any variable font (Open Sans .ttf in this case), then the downloaded result will only contain one variation. So variable font file narrows down to just static font file.
Is there a way to fix that, or it is just not supported yet?

Fonts issue.zip

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

1 participant