{"id":13511985,"url":"https://github.com/aui/font-spider","last_synced_at":"2025-05-14T03:12:03.992Z","repository":{"id":24032317,"uuid":"27417231","full_name":"aui/font-spider","owner":"aui","description":"Smart webfont compression and format conversion tool","archived":false,"fork":false,"pushed_at":"2022-12-30T18:18:29.000Z","size":10865,"stargazers_count":5100,"open_issues_count":81,"forks_count":402,"subscribers_count":158,"default_branch":"master","last_synced_at":"2025-05-13T01:39:34.707Z","etag":null,"topics":["eot","font-face","opentype","svg","truetype","ttf","webfont","woff","woff2"],"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/aui.png","metadata":{"files":{"readme":"README-JA.md","changelog":"CHANGELOG.md","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":"2014-12-02T05:43:54.000Z","updated_at":"2025-05-10T14:32:19.000Z","dependencies_parsed_at":"2023-01-14T00:16:53.345Z","dependency_job_id":null,"html_url":"https://github.com/aui/font-spider","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aui%2Ffont-spider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aui%2Ffont-spider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aui%2Ffont-spider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aui%2Ffont-spider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aui","download_url":"https://codeload.github.com/aui/font-spider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059521,"owners_count":22007771,"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":["eot","font-face","opentype","svg","truetype","ttf","webfont","woff","woff2"],"created_at":"2024-08-01T03:01:22.911Z","updated_at":"2025-05-14T03:11:58.981Z","avatar_url":"https://github.com/aui.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Repository","其他","JavaScript (485)"],"sub_categories":["Font"],"readme":"# font-spider \n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-ci-image]][travis-ci-url]\n\n[[简体中文]](./README-ZH-CN.md) | [[English]](./README.md) | [[日本語]](./README-JA.md)\n\nフォント・スパイダー（font-spider）は、Webフォントを圧縮するためのスマートなツールです，Webページに使用されるWebフォントを分析し、必要に応じて圧縮することができます。\n\n公式サイト：\u003chttp://font-spider.org\u003e\n\n## 特徴\n\n1. 必要に応じて圧縮：不必要なグリフを削除し、小さなフォントファイルを圧縮することができます。\n2. ローカル処理：ローカルHTMLとCSSファイルの分析に基づいて、JavaScriptとサーバー側のサポートの必要はありません。\n3. 自動トランスコーディング：すべてのブラウザでサポートされているフォントファイルに変換することができます。\n\n## インストール\n\n[nodejs](http://nodejs.org)のインストールを完了した後、以下のコードを実行します：\n\n``` shell\nnpm install font-spider -g\n```\n\n## 使用例\n\n### 一、CSSコード\n\n``` css\n/*CSSの記述*/\n@font-face {\n  font-family: 'pinghei';\n  src: url('../font/pinghei.eot');\n  src:\n    url('../font/pinghei.eot?#font-spider') format('embedded-opentype'),\n    url('../font/pinghei.woff') format('woff'),\n    url('../font/pinghei.ttf') format('truetype'),\n    url('../font/pinghei.svg') format('svg');\n  font-weight: normal;\n  font-style: normal;\n}\n\n/*フォントを選ぶ*/\n.home h1, .demo \u003e .test {\n    font-family: 'pinghei';\n}\n```\n\n\u003e 特記： `@font-face` の中の `src` で記述の .ttf ファイル存在している必要があります、残りのフォーマットは font-spider が自動自動的に生成することができます。\n\n### 二、Webフォントを圧縮\n\n``` shell\nfont-spider [options] \u003chtmlFile1 htmlFile2 ...\u003e\n```\n\n#### htmlFiles\n\n一つ或いは一つ以上のページアドレス、HTTP形式はサポートされています。\n\n例えば：\n\n``` shell\nfont-spider dest/news.html dest/index.html dest/about.html\n```\n\n#### options\n\n``` shell\n-h, --help                    ヘルプ情報の出力\n-V, --version                 現在のバージョンの出力\n--info                        WebフォントのJSON情報の出力、圧縮とトランスコーディングなし\n--ignore \u003cpattern\u003e            無視している設定ファイル（正規表現をサポートしています）\n--map \u003cremotePath,localPath\u003e  CSS内部のHTTPパスがローカルへのマッピング\n--no-backup                   フォントファイルのバックアップなし\n--debug                       デバッグモード\n```\n\n#### パラメータの例\n\nワイルドカードを使用して複数のHTMLファイル関連するWEBフォントの圧縮：\n\n``` shell\nfont-spider dest/*.html\n```\n\n`--info` で全サイトのWEBフォントをチェックする：\n\n``` shell\nfont-spider --info http://fontawesome.io\n```\n\n`--ignore` ファイルの無視：\n\n``` shell\nfont-spider --ignore \"icon\\\\.css$\" dest/*.html\n```\n\n`--map` オンラインページのWEBフォントがローカルにマッピングして圧縮する（ローカルパスは絶対パスが必要）：\n\n``` shell\nfont-spider --map \"http://font-spider.org/font,/Website/font\" http://font-spider.org/index.html\n```\n\n## プラグインの構築\n\n- [grunt-font-spider](https://github.com/aui/grunt-font-spider)\n- [gulp-font-spider](https://github.com/aui/gulp-font-spider)\n\n## API\n\nフォント・スパイダーはクローラーと圧縮モジュールが含みます、APIのドキュメント：[API.md](./API.md)\n\n## 制限\n\n- 固定的なテキストとスタイルのみをサポートされて、JavaScriptのによって挿入動的な要素とスタイルがサポートされていません。\n- OpenTypeのフォントのサポートが不完全です。\n-  `utf-8`のHTMLとCSSのみをサポートされています。\n- CSS の`content`プロパティはプレーンテキストのみをサポートされて、プロパティやカウンターなどの機能をサポートされていません。\n\n## 関連リンク\n\n- [TTF版の源ノ角ゴシック](https://mega.nz/#!PZxFSYQI!ICvNugaFX_y4Mh003-S3fao1zU0uNpeSyprdmvHDnwc)\n- [grunt-font-spider](https://github.com/aui/grunt-font-spider)\n- [gulp-font-spider](https://github.com/aui/gulp-font-spider)\n\n[npm-image]: https://img.shields.io/npm/v/font-spider.svg\n[npm-url]: https://npmjs.org/package/font-spider\n[node-version-image]: https://img.shields.io/node/v/font-spider.svg\n[node-version-url]: http://nodejs.org/download/\n[downloads-image]: https://img.shields.io/npm/dm/font-spider.svg\n[downloads-url]: https://npmjs.org/package/font-spider\n[travis-ci-image]: https://travis-ci.org/aui/font-spider.svg?branch=master\n[travis-ci-url]: https://travis-ci.org/aui/font-spider\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faui%2Ffont-spider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faui%2Ffont-spider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faui%2Ffont-spider/lists"}