{"id":15973428,"url":"https://github.com/rana/google-fonts","last_synced_at":"2025-08-10T20:05:41.094Z","repository":{"id":249194539,"uuid":"827888524","full_name":"rana/google-fonts","owner":"rana","description":"Download and cache TTF fonts from Google with Rust.","archived":false,"fork":false,"pushed_at":"2024-10-18T16:45:12.000Z","size":44077,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T08:27:24.655Z","etag":null,"topics":["font","fonts","glyph","google","graphics","rust","rust-crate","rust-lang","rust-library","text","text-rendering","true-type","ttf","typography"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-12T15:43:30.000Z","updated_at":"2024-10-18T16:45:17.000Z","dependencies_parsed_at":"2024-10-27T17:21:53.943Z","dependency_job_id":null,"html_url":"https://github.com/rana/google-fonts","commit_stats":null,"previous_names":["rana/google-fonts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rana/google-fonts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fgoogle-fonts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fgoogle-fonts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fgoogle-fonts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fgoogle-fonts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rana","download_url":"https://codeload.github.com/rana/google-fonts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fgoogle-fonts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269780617,"owners_count":24474686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["font","fonts","glyph","google","graphics","rust","rust-crate","rust-lang","rust-library","text","text-rendering","true-type","ttf","typography"],"created_at":"2024-10-07T21:04:52.457Z","updated_at":"2025-08-10T20:05:37.538Z","avatar_url":"https://github.com/rana.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# google-fonts\n\nDownload and cache TTF fonts from Google.\n\n`11,689` fonts and `1,708` font families.\n\nSimilar to Android Studio [Downloadable Fonts](https://developer.android.com/develop/ui/views/text-and-emoji/downloadable-fonts), and Google API [Web Fonts](https://developers.google.com/fonts/docs/developer_api).\n\n# Example\n\nDownload font data with a few approaches.\n\n```rust\nuse google_fonts::lemonada_variable;\nuse google_fonts::Font::NotoSansRegular;\nuse google_fonts::Font::RobotoRegular;\nuse ttf_parser::Face;\n\nfn main() {\n    // Get and cache font data with a named function.\n    let font_data = lemonada_variable().unwrap();\n    let face = Face::parse(\u0026font_data, 0).unwrap();\n    eprintln!(\"Font data: {:?}\", face);\n\n    // Get and cache font data with an enum variant function.\n    let font_data = NotoSansRegular.get_with_cache().unwrap();\n    let face = Face::parse(\u0026font_data, 0).unwrap();\n    eprintln!(\"Font data: {:?}\", face);\n\n    // Get font data without caching by using an enum variant function.\n    let font_data = RobotoRegular.get().unwrap();\n    let face = Face::parse(\u0026font_data, 0).unwrap();\n    eprintln!(\"Font data: {:?}\", face);\n}\n```\n\n# Crate features\n\n`full`, `variable`, and `static` crate features are available.\n* `variable` enables only fonts with [variable font technology](https://fonts.google.com/knowledge/using_variable_fonts_on_the_web).\n* `static` enables only fonts with _static font technology_.\n* `full` enables both `variable` and `static` features.\n\n`variable` is the default feature.\n\nVariable font technology is newer, more flexible, and provides style variations in one or two files. Static font technology uses more font files to accomplish the same thing. A majority of the fonts are in the `static` feature. \n\nPrefer the `variable` feature when possible.\n\nEnable `variable` to significantly improve build time, crate size, and rust-analyzer performance.\n\n# Doc comment font images\n\nView font images from docs.\n\n![tooltip](imgs/tooltip.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frana%2Fgoogle-fonts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frana%2Fgoogle-fonts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frana%2Fgoogle-fonts/lists"}