{"id":18778990,"url":"https://github.com/randombits-dev/google-font-db","last_synced_at":"2026-01-31T19:33:47.013Z","repository":{"id":221054228,"uuid":"752509234","full_name":"randombits-dev/google-font-db","owner":"randombits-dev","description":"Contains font preview images, woff2 font files, and metadata from Google Fonts","archived":false,"fork":false,"pushed_at":"2024-11-25T17:17:17.000Z","size":325652,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T21:42:47.111Z","etag":null,"topics":["font-picker","fonts","generator","google-fonts","preview"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/randombits-dev.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,"zenodo":null}},"created_at":"2024-02-04T03:32:02.000Z","updated_at":"2024-11-25T17:17:21.000Z","dependencies_parsed_at":"2025-04-13T10:43:59.678Z","dependency_job_id":null,"html_url":"https://github.com/randombits-dev/google-font-db","commit_stats":null,"previous_names":["randombits-dev/font-previews"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/randombits-dev/google-font-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randombits-dev%2Fgoogle-font-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randombits-dev%2Fgoogle-font-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randombits-dev%2Fgoogle-font-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randombits-dev%2Fgoogle-font-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/randombits-dev","download_url":"https://codeload.github.com/randombits-dev/google-font-db/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randombits-dev%2Fgoogle-font-db/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28951418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-picker","fonts","generator","google-fonts","preview"],"created_at":"2024-11-07T20:18:02.553Z","updated_at":"2026-01-31T19:33:46.999Z","avatar_url":"https://github.com/randombits-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Font Previews\n\nPreview images of Google Fonts, for use in font pickers, etc.\n\n## Output Files\n\nThe `output/google-fonts.json` file contains metadata for the normal style/weight of all the fonts:\n\n```json\n{\n  \"name\": \"ABeeZee\",\n  \"category\": \"Sans Serif\",\n  \"popularity\": 175,\n  \"trending\": 657,\n  \"dateAdded\": \"2012-09-30\",\n  \"img\": \"abeezee-normal-400.webp\",\n  \"base64\": \"UklGRqQCAABXRUJQ...\"\n}\n```\n\nThe `output/google-fonts-all-styles.json` file contains metadata for every style/weight of every font:\n\n```json\n{\n  \"name\": \"ABeeZee\",\n  \"category\": \"Sans Serif\",\n  \"popularity\": 175,\n  \"trending\": 657,\n  \"dateAdded\": \"2012-09-30\",\n  \"styles\": [\n    {\n      \"img\": \"abeezee-normal-400.webp\",\n      \"type\": \"normal\",\n      \"weight\": 400,\n      \"img\": \"abeezee-normal-400.webp\",\n      \"base64\": \"UklGRqQCAABXRUJQ...\"\n    },\n    {\n      \"img\": \"abeezee-italic-400.webp\",\n      \"type\": \"italic\",\n      \"weight\": 400,\n      \"base64\": \"UklGRqQCAABXRUJQ...\"\n    }\n  ]\n}\n```\n\nEach font references the `webp` image name, and also includes the `base64` encoded image data. \n\n## How the images were generated\n\n1. The entire Google Font data was downloaded from [here](https://github.com/google/fonts).\n2. The METADATA.pb files for each font was parsed.\n3. Using puppeteer, an HTML page was rendered for each font, displaying the font name in that font. The HTML page was then captured as a screenshot. \n4. The screenshot was saved as both a webp image and a base64 encoded string.\n5. The font list was written to a JSON file, which included the base64 encoded image data, and references the name of the webp image.\n\n## How to use the data\n\nIt is recommended that you filter and/or condense the data to reduce the file size. For example, you will want to choose to either the webp or base64 image data, and remove the other. You probably also want to remove the extra metadata that is not needed for your use case.\n\nYou can create a nodejs script in your project that imports the data, and modifies it:\n\n```javascript\nimport fontList from 'font-previews/output/google-fonts.json' assert {type: 'json'};\nimport fs from 'node:fs';\n\n// sort by popularity\nconst sorted = fontList.sort((a, b) =\u003e {\n  return a.popularity - b.popularity;\n});\n\n// only include data we need\nconst newData = sorted.map(font =\u003e {\n  return [\n    font.name,\n    font.category,\n    font.base64\n  ];\n});\n\nfs.writeFileSync('newData.json', JSON.stringify(newData));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandombits-dev%2Fgoogle-font-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandombits-dev%2Fgoogle-font-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandombits-dev%2Fgoogle-font-db/lists"}