{"id":28403114,"url":"https://github.com/ecomfe/gulp-fontmin","last_synced_at":"2025-08-08T10:43:12.585Z","repository":{"id":28489291,"uuid":"32005518","full_name":"ecomfe/gulp-fontmin","owner":"ecomfe","description":"Minify font seamlessly","archived":false,"fork":false,"pushed_at":"2019-07-21T01:09:26.000Z","size":4073,"stargazers_count":80,"open_issues_count":6,"forks_count":12,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-07-05T06:07:10.530Z","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":"duvenaud/deep-limits","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ecomfe.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":"2015-03-11T08:05:24.000Z","updated_at":"2025-02-12T10:34:22.000Z","dependencies_parsed_at":"2022-08-25T21:22:42.702Z","dependency_job_id":null,"html_url":"https://github.com/ecomfe/gulp-fontmin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ecomfe/gulp-fontmin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fgulp-fontmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fgulp-fontmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fgulp-fontmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fgulp-fontmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecomfe","download_url":"https://codeload.github.com/ecomfe/gulp-fontmin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fgulp-fontmin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269409959,"owners_count":24412143,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-06-01T17:07:23.265Z","updated_at":"2025-08-08T10:43:12.549Z","avatar_url":"https://github.com/ecomfe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-fontmin\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Downloads][downloads-image]][npm-url]\n[![Dependencies][dep-image]][dep-url]\n[![Font support][font-image]][font-url]\n\n[downloads-image]: http://img.shields.io/npm/dm/gulp-fontmin.svg\n[npm-url]: https://npmjs.org/package/gulp-fontmin\n[npm-image]: http://img.shields.io/npm/v/gulp-fontmin.svg\n\n[travis-url]: https://travis-ci.org/ecomfe/gulp-fontmin\n[travis-image]: http://img.shields.io/travis/ecomfe/gulp-fontmin.svg\n\n[dep-url]: https://david-dm.org/ecomfe/gulp-fontmin\n[dep-image]: http://img.shields.io/david/ecomfe/gulp-fontmin.svg\n\n[font-image]:https://img.shields.io/badge/font-senty-blue.svg\n[font-url]: http://font.sentywed.com/\n\n\u003e Minify TTF font to SVG, EOT, WOFF with [fontmin](https://github.com/ecomfe/fontmin)\n\n## Install\n\n```\n$ npm install --save-dev gulp-fontmin\n```\n\n## Usage\n\n```js\nvar gulp = require('gulp');\nvar fontmin = require('gulp-fontmin');\n\ngulp.task('default', function () {\n    return gulp.src('src/fonts/*.ttf')\n        .pipe(fontmin({\n            text: '天地玄黄 宇宙洪荒',\n        }))\n        .pipe(gulp.dest('dist/fonts'));\n});\n```\n\n\n## API\n\n### fontmin(options)\n\nOptions:\n\n* `text`: A string corresponding glyphs of ttf\n* `onlyChinese`: {boolean} keep chinese only, exclude Latin, number and symbol. Default = false\n* `fontPath`: {string=} location of font file.\n* `hinting`: {boolean=} keep hint info, defaults true.\n* `quiet`: {boolean=} print how many fonts were effected, defaults false.\n\n\n## Practice\n\n### Get needed text from html\n\n```js\n\nfunction minifyFont(text, cb) {\n    gulp\n        .src('src/font/*.ttf')\n        .pipe(fontmin({\n            text: text\n        }))\n        .pipe(gulp.dest('dest/font'))\n        .on('end', cb);\n}\n\ngulp.task('fonts', function(cb) {\n\n    var buffers = [];\n\n    gulp\n        .src('index.html')\n        .on('data', function(file) {\n            buffers.push(file.contents);\n        })\n        .on('end', function() {\n            var text = Buffer.concat(buffers).toString('utf-8');\n            minifyFont(text, cb);\n        });\n\n});\n```\n\n## Related\n\n- [gulp-fontmin-demo](https://github.com/junmer/gulp-fontmin-demo)\n- [fontmin](https://github.com/ecomfe/fontmin)\n- [fontmin-app](https://github.com/ecomfe/fontmin-app)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Fgulp-fontmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecomfe%2Fgulp-fontmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Fgulp-fontmin/lists"}