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

Where did all the fonts go? #572

Closed
aapeliv opened this issue Sep 14, 2022 · 11 comments
Closed

Where did all the fonts go? #572

aapeliv opened this issue Sep 14, 2022 · 11 comments
Labels
needs triage Issues and pull requests that need triage attention

Comments

@aapeliv
Copy link

aapeliv commented Sep 14, 2022

I used to be able to clone this repo, which would include the woff2 files in the subfolder for each font, so I could just upload them and use them (outside the npm world). Now the files/ folder just has an empty file-list.json: e.g.

https://github.com/fontsource/fontsource/tree/main/fonts/google/abel/files

I'm wondering how to download the generated fonts now? I see there were some changes to the folder structure. I used to be on this commit which seems to be gone now:

commit 2d39275d5f24236241ab79f3d835cd2141bd629c (grafted, HEAD -> main)
Author: fontsource-bot <83556432+fontsource-bot@users.noreply.github.com>
Date:   Sun Jan 30 00:42:46 2022 +0000
@aapeliv aapeliv added the needs triage Issues and pull requests that need triage attention label Sep 14, 2022
@ayuhito
Copy link
Member

ayuhito commented Sep 14, 2022

We don't host the files in the repo anymore since storing binary files in Git caused us a few problems DX-wise. #456 might be an interesting read for you.

If you need to download a specific font, you could go to a specific font page and click on the download icon found at the top right - e.g. https://fontsource.org/fonts/abel
This is subsequently being overhauled with #555.

If you want ALL the font files for some alternative project, you could fork this repo, edit .gitignore to keep the WOFF/WOFF2 files and edit this workflow to your credentials (you don't need the algolia stuff) to have your own repo.
A future easier solution for you would be the completion of #562.

@aapeliv
Copy link
Author

aapeliv commented Sep 14, 2022

OK, thanks, makes sense! I'll have a look at a custom thing later. My use case is that I host all the fonts personally and this project was a fantastic way of just dropping in a <link> to a hosted css file and having it load the fonts.

Maybe you could include this in the breaking changes in changelog since it's not mentioned there?

And thanks for the quick response. I much appreciate this project and your effort making and maintaining it!

@aapeliv aapeliv closed this as completed Sep 14, 2022
@ayuhito
Copy link
Member

ayuhito commented Sep 14, 2022

Maybe you could include this in the breaking changes in changelog since it's not mentioned there?

Aha, I feel like this isn't the intended way to use the repo so I can't promise non-breaking changes in that regard. Semver is only necessarily guaranteed for the NPM packages.

@thomas-tamio
Copy link

thomas-tamio commented Dec 25, 2022

@ayuhito
I made a fork and edited main/fonts/google/.gitignore, got a Google Web Fonts API key and added it to secrets env.
When I run the Build and Release [Force Rebuild No Deploy] [Manual] action, I just get "Job skipped".
Am I missing something?

EDIT: Got it working! Missed to update the commit of the autocomitter

@ayuhito
Copy link
Member

ayuhito commented Dec 25, 2022

@tamiogmbh, great you figured that out. Should be hugely simplified with the CLI when #590 is merged!

@thomas-tamio
Copy link

thomas-tamio commented Dec 25, 2022

@ayuhito Yes! I saw the CLI coming, but we don't have time to wait

First I hit this issue, which was an easy fix, just set concurrency to 1 (but it took hours), but then I hit the following issue:

image

Do you have any idea what the cause might be?

EDIT: Also, how do I generate the JSON served from https://api.fontsource.org/v1/fonts? Is this the file /main/website/public/algolia.json?

@ayuhito
Copy link
Member

ayuhito commented Dec 26, 2022

@tamiogmbh, you might want to remove the check fonts part in the workflow. I've never seen that error but I have a feeling it's related to that.

As for the metadata, each font has its own metadata.json file. E.g. https://cdn.jsdelivr.net/npm/@fontsource/roboto-flex@4.5.2/metadata.json

@thomas-tamio
Copy link

thomas-tamio commented Dec 26, 2022

@ayuhito Hm, it seems to fail when committing the font files, I got a different error this time around.

image

@ayuhito
Copy link
Member

ayuhito commented Dec 26, 2022

Oh, this is a GitHub limitation where you can't upload more than 2GB in a single commit. You're better off doing this locally by running the scripts yourself.

If you want automated weekly builds, you'll need to commit the font files locally in batches of less than 2GB until everything is uploaded. Then future auto build diffs will always be less than the limit.

@thomas-tamio
Copy link

@ayuhito Just wanted to say thank you for the help and for making this library! I built it locally and added it to our CDN, works as expected. I look forward to the CLI so it's simpler to update & setup ;-)

@ayuhito
Copy link
Member

ayuhito commented Mar 8, 2023

Note that in V5 we are migrating the font packages and all its files to fontsource/font-files with the new CLI. Currently unpublished as we work out all the bugs and finish off the website, but it should address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issues and pull requests that need triage attention
Projects
None yet
Development

No branches or pull requests

3 participants