{"id":21414884,"url":"https://github.com/magic/glyphs","last_synced_at":"2025-03-16T18:42:08.398Z","repository":{"id":95016703,"uuid":"232207505","full_name":"magic/glyphs","owner":"magic","description":"generate minimal webfonts from a directory of svg files. builds: css, @magic/css, a html preview, @magic-modules, a js lib, ttf, woff, woff2, eot and svg fonts.","archived":false,"fork":false,"pushed_at":"2021-09-10T13:19:40.000Z","size":618,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T05:27:19.934Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magic.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":"2020-01-07T00:03:11.000Z","updated_at":"2021-09-10T13:19:42.000Z","dependencies_parsed_at":"2023-04-06T11:52:58.772Z","dependency_job_id":null,"html_url":"https://github.com/magic/glyphs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fglyphs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fglyphs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fglyphs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fglyphs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magic","download_url":"https://codeload.github.com/magic/glyphs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243911273,"owners_count":20367651,"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":[],"created_at":"2024-11-22T18:34:24.468Z","updated_at":"2025-03-16T18:42:08.379Z","avatar_url":"https://github.com/magic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## @magic/glyphs\n\n### UNFINISHED, WIP.\n\ntakes a directory of svgs and builds\n* iconfont files (ttf, woff2, woff, eot, svg),\n* a [@magic/css](https://github.com/magic/css) file,\n* a css file,\n* a file with a [@magic-module](https://magic-modules.github.io/) for each icon\n* and a html-preview.\n\n[![NPM version][npm-image]][npm-url]\n[![Linux Build Status][travis-image]][travis-url]\n[![Windows Build Status][appveyor-image]][appveyor-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n[![Greenkeeper badge][greenkeeper-image]][greenkeeper-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n\n[npm-image]: https://img.shields.io/npm/v/@magic/glyphs.svg\n[npm-url]: https://www.npmjs.com/package/@magic/glyphs\n[travis-image]: https://img.shields.io/travis/com/magic/glyphs/master\n[travis-url]: https://travis-ci.com/magic/glyphs\n[appveyor-image]: https://img.shields.io/appveyor/ci/magic/glyphs/master.svg\n[appveyor-url]: https://ci.appveyor.com/project/magic/glyphs/branch/master\n[coveralls-image]: https://coveralls.io/repos/github/magic/glyphs/badge.svg\n[coveralls-url]: https://coveralls.io/github/magic/glyphs\n[greenkeeper-image]: https://badges.greenkeeper.io/magic/glyphs.svg\n[greenkeeper-url]: https://badges.greenkeeper.io/magic/glyphs.svg\n[snyk-image]: https://snyk.io/test/github/magic/glyphs/badge.svg\n[snyk-url]: https://snyk.io/test/github/magic/glyphs\n\n\n## install\n```bash\n// globally installed cli\nnpm install -g @magic/glyphs\n\n// locally in your app\nnpm install --save-dev --save-exact @magic/glyphs\n```\n\n## usage\nafter installing globally, `magic-glyphs` will be available as an executable on the PATH.\n\nif installed as app dependency, `magic-glyphs`\nwill be available in package.json npm run scripts,\nand installed in node_modules/.bin/magic-glyphs.\n\n### cli\nread all svg files in src,\n\nthen write svg, ttf, woff, woff2, and eot,\u003cbr\u003e\njs, css, html, @magic/css, and @magic/modules\nfiles to dist.\n\n```bash\nmagic-glyphs --dir src --out dist --name fontname --cssPrefix fn-\n```\n\n### api\n```javascript\nimport glyphs from '@magic/glyphs'\n\nconst options = {\n  // settings that get used in output files\n  name: 'magic-icons', // name of the font when using it in css\n  cssPrefix: 'mi',     // prefix of the icon class, mi-iconname\n  dir: 'svg',          // the directory to read from\n  output: 'dist',      // the directory to write to\n  webRoot: '/',        // web root of the resulting homepage\n  fontDir: '',         // sub directory to write font files to.\n  cssDir: '',          // sub directory to write css files to.\n  jsDir: '',           // sub directory to write js files to.\n  minimal: false,      // only output minimal files, no preview, no js.\n  noCss: false,        // do not generate css file\n  noMagicCss: false,   // do not generate magicCss.mjs file\n  noJs: false,         // do not generate javascript file\n  noPreview: false,    // do not generate preview\n  noModules: false,    // do not generate @magic-module file\n  noWrite: false,      // do not write any files\n\n  // default options for svg \u003c\u003e font generators\n  ascent: undefined,\n  centerHorizontally: true,\n  descent: 0,\n  fixedWidth: false,\n  fontId: null,\n  formats: ['svg', 'ttf', 'eot', 'woff2', 'woff'],\n  formatsOptions: {\n    ttf: {\n      copyright: null,\n      ts: null,\n      version: null,\n    },\n  },\n  glyphTransformFn: null,\n  metadata: null,\n  metadataProvider: null,\n  fontHeight: 1000,\n  normalize: true,\n  prependUnicode: false,\n  round: 10e12,\n  startUnicode: 0xea01,\n  verbose: false,\n}\n\nconst results = glyphs(options)\n```\n\n#### libraries used to build font files:\n* [svgicons2svgfont](https://www.npmjs.com/package/svgicons2svgfont)\n* [svg2ttf](https://www.npmjs.com/package/svg2ttf)\n* [ttf2eot](https://www.npmjs.com/package/ttf2eot)\n* [ttf2woff](https://www.npmjs.com/package/ttf2woff)\n* [ttf2woff2](https://www.npmjs.com/package/ttf2woff2)\n\n#### changelog\n\n##### 0.0.1\nfirst release\n\n##### 0.0.2 - unreleased\n...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic%2Fglyphs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagic%2Fglyphs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic%2Fglyphs/lists"}