{"id":13721004,"url":"https://github.com/kekee000/fonteditor-core","last_synced_at":"2025-10-12T17:27:38.481Z","repository":{"id":40643554,"uuid":"39325180","full_name":"kekee000/fonteditor-core","owner":"kekee000","description":"fonteditor core functions","archived":false,"fork":false,"pushed_at":"2025-08-27T07:48:43.000Z","size":2149,"stargazers_count":374,"open_issues_count":16,"forks_count":73,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-10-08T10:40:21.841Z","etag":null,"topics":["convert","eot","fonteditor","otfread","svg","ttf","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/kekee000.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,"zenodo":null}},"created_at":"2015-07-19T06:45:58.000Z","updated_at":"2025-09-24T04:23:31.000Z","dependencies_parsed_at":"2023-10-16T06:37:16.419Z","dependency_job_id":"73cdf9a6-1c1a-45f7-a2b2-3bd0638af42f","html_url":"https://github.com/kekee000/fonteditor-core","commit_stats":{"total_commits":110,"total_committers":13,"mean_commits":8.461538461538462,"dds":0.5818181818181818,"last_synced_commit":"cb98713f50d1ec6ae4822ab87d1f836a885599b1"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/kekee000/fonteditor-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Ffonteditor-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Ffonteditor-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Ffonteditor-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Ffonteditor-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kekee000","download_url":"https://codeload.github.com/kekee000/fonteditor-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Ffonteditor-core/sbom","scorecard":{"id":554170,"data":{"date":"2025-08-11","repo":{"name":"github.com/kekee000/fonteditor-core","commit":"3cbcc38e2b96ae52556f121779dba9b4dd6d5f3b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/25 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"13 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: woff2/woff2.wasm:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T11:52:58.361Z","repository_id":40643554,"created_at":"2025-08-20T11:52:58.361Z","updated_at":"2025-08-20T11:52:58.361Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001508,"owners_count":26083118,"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-10-09T02:00:07.460Z","response_time":59,"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":["convert","eot","fonteditor","otfread","svg","ttf","woff","woff2"],"created_at":"2024-08-03T01:01:11.073Z","updated_at":"2025-10-12T17:27:38.470Z","avatar_url":"https://github.com/kekee000.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# fonteditor-core\n\n**FontEditor core functions**\n\n[![NPM version][npm-image]][npm-url]\n[![Downloads][downloads-image]][npm-url]\n\n## Feature\n\nRead and write sfnt font like ttf, woff, woff2, eot, svg, otf.\n\n- sfnt parse\n- read, write, transform fonts\n  - ttf (read and write)\n  - woff (read and write)\n  - woff2 (read and write)\n  - eot (read and write)\n  - svg (read and write)\n  - otf (only read and convert to ttf)\n- ttf glyph adjust\n- svg to glyph\n- ESM compatibility for modern bundlers (Webpack, Rollup, Vite, Next.js, etc.)\n- TypeScript support with type definitions\n\n## Usage\n\n```javascript\n// read font file\nimport {createFont} from 'fonteditor-core';\nimport fs from 'fs';\n\nconst buffer = fs.readFileSync('font.ttf');\n// read font data, support format:\n// - for ttf, otf, woff, woff2, support ArrayBuffer, Buffer\n// - for svg, support string or Document(parsed svg)\nconst font = createFont(buffer, {\n    // support ttf, woff, woff2, eot, otf, svg\n    type: 'ttf',\n    // only read `a`, `b` glyphs\n    subset: [65, 66],\n    // read font hinting tables, default false\n    hinting: true,\n    // read font kerning tables, default false\n    kerning: true,\n    // transform ttf compound glyph to simple\n    compound2simple: true,\n    // inflate function for woff\n    inflate: undefined,\n    // for svg path\n    combinePath: false,\n});\nconst fontObject = font.get();\nconsole.log(Object.keys(fontObject));\n\n/* =\u003e [ 'version',\n  'numTables',\n  'searchRenge',\n  'entrySelector',\n  'rengeShift',\n  'head',\n  'maxp',\n  'glyf',\n  'cmap',\n  'name',\n  'hhea',\n  'post',\n  'OS/2',\n  'fpgm',\n  'cvt',\n  'prep'\n]\n*/\n\n// write font file\nconst buffer = font.write({\n    // support ttf, woff, woff2, eot, svg\n    type: 'woff',\n    // save font hinting tables, default false\n    hinting: false,\n    // save font kerning tables, default false\n    kerning: false,\n    // write glyf data when simple glyph has no contours, default false\n    writeZeroContoursGlyfData: false,\n    // deflate function for woff, eg. pako.deflate\n    deflate: undefined,\n    // for user to overwrite head.xMin, head.xMax, head.yMin, head.yMax, hhea etc.\n    support: {head: {}, hhea: {}}\n});\nfs.writeFileSync('font.woff', buffer);\n\n// to base64 str\nfont.toBase64({\n    // support ttf, woff, woff2, eot, svg\n    type: 'ttf'\n});\n\n// optimize glyphs\nfont.optimize()\n\n// compound2simple\nfont.compound2simple()\n\n// sort glyphs\nfont.sort()\n\n// find glyphs\nconst result = font.find({\n  unicode: [65]\n});\n\nconst result = font.find({\n  filter: function (glyf) {\n    return glyf.name === 'icon'\n  }\n});\n\n// merge another font object\nfont.merge(font1, {\n  scale: 1\n});\n```\n\n### Modern ES Module Usage\n\nThis library supports both CommonJS and ES Modules. For detailed information on using with modern bundlers, please see [ESM_USAGE.md](./ESM_USAGE.md).\n\n```javascript\n// ESM import\nimport fonteditorCore, { createFont, woff2 } from 'fonteditor-core';\n\ncreateFont(buffer, options);\n```\n\n### woff2\n\n**Notice:** woff2 use wasm build of google woff2, before read and write `woff2`, we should first call `woff2.init()`.\n\n```javascript\nimport {createFont, woff2} from 'fonteditor-core';\n\n// in nodejs\nwoff2.init().then(() =\u003e {\n    // read woff2\n    const font =  createFont(buffer, {\n      type: 'woff2'\n    });\n    // write woff2\n    const buffer = font.write({type: 'woff2'});\n});\n\n// in browser\nwoff2.init('/assets/woff2.wasm').then(() =\u003e {\n    // read woff2\n    const font = createFont();\n    // write woff2\n    const arrayBuffer = font.write({type: 'woff2'});\n});\n```\n\n\n## Demo\n\n```\nnpm run dev\n```\n\n## build\n\n```\nnpm run build\n```\n\n## test\n\n```\nnpm run test\n```\n\n## support\n\nNode.js:\u003e= 12.0\n\nBrowser: Chrome, Safari\n\n## Related\n\n- [fonteditor](https://github.com/ecomfe/fonteditor)\n- [fontmin](https://github.com/ecomfe/fontmin)\n- [fonteditor online](https://kekee000.github.io/fonteditor/index.html)\n\n## License\n\nMIT © Fonteditor\n\n[downloads-image]: http://img.shields.io/npm/dm/fonteditor-core.svg\n[npm-url]: https://npmjs.org/package/fonteditor-core\n[npm-image]: http://img.shields.io/npm/v/fonteditor-core.svg\n\n[travis-url]: https://travis-ci.org/kekee000/fonteditor-core\n[travis-image]: http://img.shields.io/travis/kekee000/fonteditor-core.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkekee000%2Ffonteditor-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkekee000%2Ffonteditor-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkekee000%2Ffonteditor-core/lists"}