-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update the Google Fonts indexing mechanism #370
Comments
@alexeymorozov I have added the secret |
This is now holding up release, so it is urgent. |
Just to keep everyone updated on the progress: in the PR, installation works now with lots of formulas even without reindexing formulas. The current issue is how to properly reindex so installation works with all formulas. For example, the
And the current formula (that was created from the archive of an old API) contains even 35 fonts. Those ones seem not to be downloadable anymore. |
Thank you @alexeymorozov . It looks like the "Trispace" font has 5 variants in the archive/our formula:
I wonder if Google Fonts simply split it into 5 fonts? |
@alexeymorozov regarding Trispace: all of the TTF files exist in the source repo: In the Google Fonts repo, it seems that they have some issue with data accuracy: On this line it says the However, I downloaded Google Font's Trispace font: It does contain all the weights for the "regular" font, but it does not contain the Condensed/SemiCondensed/Expanded/SemiExpanded fonts: I think either we create a PR to Google Fonts that adds these 4 fonts, or just ignore this problem for now. |
@ronaldtse Thank you for the help 🙏 I will use this approach. |
While I'm finishing with the import from the google/fonts repo, I propose we also do the import from the API. API contains 6129 font files, at least 2945 of them are additional to the repo. In the repo there are 3377 font files. Another thing - for purposes of downloading from API, checking the font files in the API may provide additional accuracy, because files in the repo and in the API may be different even when have the same style/weight. E.g. in the repo a file may be a variable one but in the API it is a regular one. API data: https://www.googleapis.com/webfonts/v1/webfonts?key=API_KEY I'm attaching files containing lists of fonts in the repo and the API: |
Released v1.21.1 with the feature. New formulas are on the After users update to the new fontist, in order for the feature to work it's needed to run |
@alexeymorozov please feel free to close this issue when complete, thanks! |
I think we have two problems to deal with:
For 1, the best choice has to be directly parsing the google/fonts GitHub repository. Changes there may be more frequent than their new Developer API, but also means we can respond to them faster. It would mean we need to parse font metadata ourselves, but that's also reasonable because we need that functionality for fonts sourced outside of Google Fonts.
For 2, users have two needs with Google Fonts:
Conclusion:
Regarding 1:
Interestingly, their metadata file (
METADATA.pb
in text protobuf) looks eerily similar to our Formula file:Except that they have:
weight
designer
category
:SERIF
,SANS_SERIF
,DISPLAY
,MONOSPACE
, ...primary_script
subsets
classifications
stroke
source
: lists where the repository/commit the font file and/or archive is from. If there issource
they have anupstream.yaml
file that lists out:They also have
DESCRIPTION.{lang}.html
that provides a description of the font, in HTML. Perhaps we should also supply this on the Formulas site.Maybe having this information would also be a good choice for Fontist...
Originally posted by @ronaldtse in #367 (comment)
The text was updated successfully, but these errors were encountered: