{"id":13518269,"url":"https://github.com/taggon/fonty","last_synced_at":"2025-05-05T19:43:10.222Z","repository":{"id":57239913,"uuid":"74970608","full_name":"taggon/fonty","owner":"taggon","description":"A simple library and CLI tool for generating web fonts","archived":false,"fork":false,"pushed_at":"2021-09-03T09:22:26.000Z","size":20,"stargazers_count":21,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T02:56:24.810Z","etag":null,"topics":["cli","css","fonty","web-fonts"],"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/taggon.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}},"created_at":"2016-11-28T12:24:37.000Z","updated_at":"2021-09-03T09:22:29.000Z","dependencies_parsed_at":"2022-08-29T22:22:36.049Z","dependency_job_id":null,"html_url":"https://github.com/taggon/fonty","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taggon%2Ffonty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taggon%2Ffonty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taggon%2Ffonty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taggon%2Ffonty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taggon","download_url":"https://codeload.github.com/taggon/fonty/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252563979,"owners_count":21768566,"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":["cli","css","fonty","web-fonts"],"created_at":"2024-08-01T05:01:42.987Z","updated_at":"2025-05-05T19:43:10.206Z","avatar_url":"https://github.com/taggon.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Fonty\n\nA simple library/CLI tool for generating web fonts.\n\n## Translations\n\n* [한국어](docs/README.ko.md)\n\n## Prerequisite\n\n* Node \u003e= 6.0\n\n## Usage\n\n```\nconst fonty = require('fonty');\n\nfonty( 'path/to/source.ttf', 'path/to/output', options );\n```\n\nIf the `path/to/output` is a directory, it should end with a single forward slash(`/`).\n\n### Options\n\n* `base64`: If true, the `css` option will automatically turn on and the css file will include base64-encoded web fonts.\n* `css`: If true, `fonty` will generate css file for the output web fonts.\n* `glyph`: A string contains the glyphs that the output fonts have. All glyphs are preserved by defalut.\n* `optimize`: If true, all empty glyphs except for space will be removed.\n* `type`: An array of output types. Default: `['ttf', 'eot', 'svg', 'woff', 'woff2']`.\n\nNote: if the `glyph` option contains a space, fonty will alias it as both new line and carrage return.\n\n### Events\n\nThe `fonty` returns an array of promises and a promise represents each type.\nSee the following code.\n\n```\nfonty( 'path/to/source.ttf', 'path/to/output', options ).map( promise =\u003e {\n\tpromise.done( (type) =\u003e {\n\t\tconsole.log( `.${type} file has been converted.` );\n\t} );\n} );\n```\n\nThe above code write a console message whenever each file conversion completed.\n\n### CLI Tool\n\nFirst, install the tool globally.\n\n```\n$ npm i -g fonty\n```\n\nAnd just use it:\n\n```\n$ fonty [options] path/to/source.ttf [path/to/output]\n```\n\nLet's say you have a big list of glyphs in `glyphs.txt` and want to generate `eot` and `woff` type webfonts from `font.ttf`.\nYou can pass the glyph list to `fonty` like this:\n\n```\n$ GLYPHS=`cat glyphs.txt` fonty --glyph=\"$GLYPHS\" --type=\"eot,woff\" font.ttf\n```\n\nYou will see more detail help if you just execute `fonty` in the command line.\n\n## License\n\nThis library is released under MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaggon%2Ffonty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaggon%2Ffonty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaggon%2Ffonty/lists"}