{"id":15366896,"url":"https://github.com/cupcakearmy/glyphance","last_synced_at":"2026-01-21T10:01:49.735Z","repository":{"id":64509549,"uuid":"568770450","full_name":"cupcakearmy/glyphance","owner":"cupcakearmy","description":"CLI tool for generating font subsets based on unicode ranges.","archived":false,"fork":false,"pushed_at":"2023-07-25T20:45:57.000Z","size":178,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T14:33:43.522Z","etag":null,"topics":["cli","converter","fonttools","tool","unicode-ranges","woff2"],"latest_commit_sha":null,"homepage":"","language":"Python","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/cupcakearmy.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":"2022-11-21T11:25:03.000Z","updated_at":"2025-02-15T13:33:43.000Z","dependencies_parsed_at":"2024-10-16T08:41:02.718Z","dependency_job_id":"d6934b12-70b4-491b-98f8-5455b14606b8","html_url":"https://github.com/cupcakearmy/glyphance","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.10526315789473684","last_synced_commit":"45346502c70f5c84f50599a0b6fd35286ce52071"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cupcakearmy/glyphance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cupcakearmy%2Fglyphance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cupcakearmy%2Fglyphance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cupcakearmy%2Fglyphance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cupcakearmy%2Fglyphance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cupcakearmy","download_url":"https://codeload.github.com/cupcakearmy/glyphance/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cupcakearmy%2Fglyphance/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28631936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["cli","converter","fonttools","tool","unicode-ranges","woff2"],"created_at":"2024-10-01T13:20:10.849Z","updated_at":"2026-01-21T10:01:49.586Z","avatar_url":"https://github.com/cupcakearmy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Glyphance\n\n\u003ckbd\u003e/ɡlɪfhɑːns/\u003c/kdb\u003e\n\nThis is a CLI utility that help reduce load times and bytes by splitting typography files into smaller chunks for different unicode ranges automatically _without the tears_.\n\n![Docker Image Version (latest semver)](https://img.shields.io/docker/v/cupcakearmy/glyphance?sort=semver\u0026style=flat-square)\n![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/cupcakearmy/glyphance?sort=semver\u0026style=flat-square)\n![Docker Pulls](https://img.shields.io/docker/pulls/cupcakearmy/glyphance?style=flat-square)\n\n## 🌈 Features\n\n- Configurable.\n- Config driven.\n- Docker image, no local install required.\n- Outputs `woff2`.\n- Provides a generated CSS file to simply include.\n\n## 🚀 Quickstart\n\nLets assume we want to use 2 variable fonts, one of which has an italic version still as a separate file. Also on our webserver we serve our static fonts from `/fonts/`.\n\n1. Get the font files\n2. Write a little config file `glyphance.yaml` and define the font-families (`Mulish` and `FireCode` e.g.) and their files or variations.\n3. Run it.\n4. Use the generate font files and CSS.\n\n```\nexample/\n├── FiraCode-VariableFont_wght.ttf\n├── Mulish-Italic-VariableFont_wght.ttf\n├── Mulish-VariableFont_wght.ttf\n└── glyphance.yaml\n```\n\n```yaml\n# glyphance.yaml\nfonts:\n  'Mulish':\n    - file: Mulish-VariableFont_wght.ttf\n      variable: true\n      css:\n        font-weight: 200 1000\n    - file: Mulish-Italic-VariableFont_wght.ttf\n      variable: true\n      css:\n        font-weight: 200 1000\n        font-style: italic\n  'FireCode':\n    - file: FiraCode-VariableFont_wght.ttf\n      variable: true\n      css:\n        font-weight: 300 700\n\noutput:\n  prefix: /fonts/\n```\n\n### Run\n\n```bash\ndocker run -v $(pwd)/example:/data cupcakearmy/glyphance\n```\n\n### Enjoy\n\nNow you can use the generated font files and import the `generated/fonts.css` into your code.\n\n\u003e Remember you can modify the `prefix` to match the folder structure of your static files.\n\n```\nexample/\n├── FiraCode-VariableFont_wght.ttf\n├── Mulish-Italic-VariableFont_wght.ttf\n├── Mulish-VariableFont_wght.ttf\n├── generated\n│   ├── 08284d4f696ab68dc7aa21c9c061c534939a3a0c.woff2\n│   ├── ...\n│   ├── ...\n│   ├── f8d95e7f048e130c09015a20689693461cc0dedb.woff2\n│   └── fonts.css\n└── glyphance.yaml\n```\n\n## 💡 Inspiration\n\nThe idea came mostly at how google fonts subsets their typefaces on [Google Fonts](https://fonts.google.com).\nThey split the fonts into multiple blocks of unicode chars, and leverage the [`unicode-range`](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range) property of `@font-face` to only deliver the parts of a font that are needed for a website, drastically reducing bytes sent over the wire.\nUnder the hood it uses the amazing [fonttools](https://github.com/fonttools/fonttools) to do the heavy lifting.\n\n## 📖 API \u0026 Documentation\n\n\u003e Config file reference can be found under [docs/config](./docs/config/).\n\n### Example\n\n```yaml\nfonts:\n  'My Font Familiy':\n    - file: ./path/relative/to/config/file.ttf|otf|...\n      variable: true # Whether ist's a variable font or not, defaults to false\n      css:\n        font-style: italic # Custom css properties to be added to the css\n\noutput:\n  dir: foo # Directory of the output\n  prefix: /static/fonts # Prefix to be added to the src URL in the CSS\n  clean: true # Whether to clean to output directory first\n  css:\n    font-weight: 400 # CSS to added to each @font-face. By defaults includes swap, normal weight and style\n```\n\n### Provide custom unicode ranges\n\nBy default Glyphance uses the same ranges as Google Fonts. However you can customize and specify your own ranges. See the [list of possible values](https://en.wikipedia.org/wiki/List_of_Unicode_characters).\n\n```yaml\nfonts:\n  'Mulish':\n    - file: Mulish-VariableFont_wght.ttf\n      variable: true\n      css:\n        font-weight: 200 1000\n    - file: Mulish-Italic-VariableFont_wght.ttf\n      variable: true\n      css:\n        font-weight: 200 1000\n        font-style: italic\n  'FireCode':\n    - file: FiraCode-VariableFont_wght.ttf\n      variable: true\n      css:\n        font-weight: 300 700\n\noutput:\n  ranges:\n    abc: U+0061-0063\n    numbers: U+0030-0039\n    dot: U+002E\n  \"\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcupcakearmy%2Fglyphance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcupcakearmy%2Fglyphance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcupcakearmy%2Fglyphance/lists"}