#google-font #repository #finding #repo

bin+lib google-fonts-sources

finding source repositories of Google Fonts fonts

17 releases (8 breaking)

0.10.3 Oct 9, 2025
0.10.1 Sep 9, 2025
0.10.0 Jul 23, 2025
0.7.1 Mar 4, 2025
0.1.0 Jul 3, 2024

#1 in #google-font

Download history 158/week @ 2025-07-09 326/week @ 2025-07-16 277/week @ 2025-07-23 115/week @ 2025-07-30 183/week @ 2025-08-06 164/week @ 2025-08-13 154/week @ 2025-08-20 41/week @ 2025-08-27 173/week @ 2025-09-03 266/week @ 2025-09-10 216/week @ 2025-09-17 463/week @ 2025-09-24 368/week @ 2025-10-01 495/week @ 2025-10-08 355/week @ 2025-10-15 123/week @ 2025-10-22

1,511 downloads per month
Used in fontc_crater

MIT/Apache

43KB
884 lines

Finding sources for Google Fonts fonts

basic usage:

use google_fonts_sources as gfsources;
// get a list of repositories:

let repo_cache = Path::new("~/where_i_want_to_checkout_fonts");
let font_repos = gfsources::discover_sources(repo_cache).unwrap();

// for each repo we find, do something with each source:

for repo in &font_repos.sources {
    let sources = match repo.get_sources(repo_cache) {
        Ok(sources) => sources,
        Err(e) => {
            eprintln!("skipping repo '{}': '{e}'", repo.repo_name());
            continue;
        }
    };

    println!("repo '{}' contains sources {sources:?}", repo.repo_name());
}

google-fonts-sources

Rust utility to help find the sources of Google Fonts fonts.

This is currently bare-bones; it inspects (or checks out) the repository at github.com/google/fonts, and for each font parses its metadata file, looking for a repository.

For each repository we find, we then look for a config.yaml file in that repository's /source directory, which is present by convention on sources intended to be built by Google Fonts.

use

To use this tool from the command line, in order to generate a JSON dictionary containing information about source repositories:

RUST_LOG=INFO cargo run -- -o repo_list.json

To use this tool from another Rust crate, see the docs.

Dependencies

~15–30MB
~530K SLoC