{"id":24617719,"url":"https://github.com/jacoblincool/nano-font","last_synced_at":"2025-10-13T20:05:08.102Z","repository":{"id":39800639,"uuid":"436696943","full_name":"JacobLinCool/nano-font","owner":"JacobLinCool","description":"A Size Limited and TypeScript Friendly Font Collection for Serverless Environment. Including 1300+ Google Fonts!","archived":false,"fork":false,"pushed_at":"2025-04-29T13:51:44.000Z","size":152539,"stargazers_count":2,"open_issues_count":12,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-03T16:41:40.887Z","etag":null,"topics":["font","serverless"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nano-font","language":"TypeScript","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/JacobLinCool.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":"2021-12-09T17:06:42.000Z","updated_at":"2024-12-19T18:30:04.000Z","dependencies_parsed_at":"2023-09-26T16:42:49.875Z","dependency_job_id":"694e703b-66cd-4498-8279-70c13b17bbc3","html_url":"https://github.com/JacobLinCool/nano-font","commit_stats":{"total_commits":29,"total_committers":3,"mean_commits":9.666666666666666,"dds":0.06896551724137934,"last_synced_commit":"0bba38c14e351be86f1ea48820d1ede0373baede"},"previous_names":["jacoblincool/worker-font"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fnano-font","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fnano-font/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fnano-font/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fnano-font/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacobLinCool","download_url":"https://codeload.github.com/JacobLinCool/nano-font/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252819754,"owners_count":21809084,"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","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","serverless"],"created_at":"2025-01-24T23:40:12.033Z","updated_at":"2025-10-13T20:05:03.063Z","avatar_url":"https://github.com/JacobLinCool.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nano Font\n\n[![NPM](https://img.shields.io/npm/v/nano-font.svg?style=flat)](https://www.npmjs.com/package/nano-font)\n\nA Size Limited and TypeScript Friendly Font Collection for Serverless Environment. Including 1300+ Google Fonts!\n\n![ts-support](img/ts-support.png)\n\n\u003e The unpacked size (~66 MB) includes all 1,300+ fonts in 3 formats.\n\u003e (ESM: ~30 MB, CJS: ~30 MB, DTS: ~6 MB)\n\u003e\n\u003e The average size of each font is about 22 KB.\n\n## Why?\n\nDuring the development of [LeetCode Stats Card](https://github.com/JacobLinCool/LeetCode-Stats-Card), a dynamic SVG image generator powered by Cloudflare Workers, I wanted to use fonts that were available on Google Fonts to display the texts.\n\nThen I faced two problems:\n\n1. External fonts are not available in SVG, so I embed the font in base64 format.\n2. The size limit of the script is 1MB, so I remove some useless characters to contain more fonts.\n\nThen, I thought if there is a collection to let me directly embed fonts in such an environment, things will be easier.\n\n## Usage\n\n```typescript\nimport Baloo_2 from \"nano-font/fonts/Baloo_2\";\n// const Baloo_2 = require(\"nano-font/fonts/Baloo_2\");\n\nconst my_css = `\nfont-face { \n    font-family: \"${Baloo_2.name}\";\n    font-style: normal;\n    font-weight: 400;\n    font-display: swap;\n    src: url(\"${Baloo_2.base64}\") format(\"woff2\");\n}`;\n```\n\n## Fonts\n\n### Font Format \u0026 Range\n\n- Format: **woff2**\n- Range: **ASCII** (32 ~ 126)\n\n### Fonts Included\n\n[1300+ Fonts](https://jacoblincool.github.io/nano-font/modules/Fonts.html) from Google Fonts.\n\n## Docs\n\n[nano-font Documentation](https://jacoblincool.github.io/nano-font/) (including supported font list)\n\n## Links\n\n- GitHub Repository: \u003chttps://github.com/JacobLinCool/nano-font\u003e\n- NPM Package: \u003chttps://www.npmjs.com/package/nano-font\u003e\n- Documentation: \u003chttps://jacoblincool.github.io/nano-font/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fnano-font","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacoblincool%2Fnano-font","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fnano-font/lists"}