{"id":16222823,"url":"https://github.com/ssssota/node-font-kit","last_synced_at":"2026-01-20T00:37:55.959Z","repository":{"id":37235868,"uuid":"330691694","full_name":"ssssota/node-font-kit","owner":"ssssota","description":"Node bindings to font-kit(Rust crate)","archived":false,"fork":false,"pushed_at":"2022-07-12T12:24:55.000Z","size":5876,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T22:03:37.192Z","etag":null,"topics":["font","nodejs","opentype","rust"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/node-font-kit","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssssota.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-18T14:28:37.000Z","updated_at":"2022-06-21T15:22:19.000Z","dependencies_parsed_at":"2022-07-10T14:46:40.398Z","dependency_job_id":null,"html_url":"https://github.com/ssssota/node-font-kit","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssssota%2Fnode-font-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssssota%2Fnode-font-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssssota%2Fnode-font-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssssota%2Fnode-font-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssssota","download_url":"https://codeload.github.com/ssssota/node-font-kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247721928,"owners_count":20985083,"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":["font","nodejs","opentype","rust"],"created_at":"2024-10-10T12:15:24.105Z","updated_at":"2026-01-20T00:37:55.912Z","avatar_url":"https://github.com/ssssota.png","language":"Rust","readme":"# node-font-kit\n\nNode.js wrapper for [font-kit (Rust crate)](https://crates.io/crates/font-kit).\n\nThis library works like [font-manager](https://github.com/foliojs/font-manager/).\n\n## Features\n\n- Get the path of installed fonts\n- Get the font info\n  - Full name (*Depends on platform.*)\n  - Family name\n  - Postscript name\n  - Italic(Oblique)?\n  - Weight\n  - Stretch\n  - Monospace?\n\n\u003e You cannot get the correct properties with variable fonts.\n\n\u003e Check [this document](https://neon-bindings.com/docs/electron-apps) if you use this with Electron.\n\n## Installation\n\n```sh\nnpm install node-font-kit\n```\n\n## Example\n\n```js\nconst { getPathAll, getProps } = require('node-font-kit');\n\n// Get the path of installed fonts\ngetPathAll().then(list =\u003e {\n  list.forEach((path, i) =\u003e console.log(i, path));\n});\n\n/*\n0 C:\\\\WINDOWS\\\\FONTS\\\\ROBOTO-THIN.TTF\n1 C:\\\\WINDOWS\\\\FONTS\\\\CANDARAB.TTF\n2 C:\\\\WINDOWS\\\\FONTS\\\\COURBI.TTF\n3 C:\\\\WINDOWS\\\\FONTS\\\\UBUNTU-LIGHT.TTF\n4 C:\\\\WINDOWS\\\\FONTS\\\\PALA.TTF\n5 C:\\\\WINDOWS\\\\FONTS\\\\COMIC.TTF\n:\n:\n*/\n\ngetProps('path/to/font.otf').then(props =\u003e {\n  props.forEach((prop) =\u003e console.log(prop));\n});\n\n/*\n{\n  fullname: 'Mplus 1p',\n  family: 'Mplus 1p',\n  postscriptName: 'Mplus1p-Regular',\n  monospace: false,\n  weight: 400,\n  strech: 1,\n  style: 'Normal'\n}\n*/\n```\n\n## API\n\n### `getPathAll() =\u003e Promise\u003cstring\u003e`\n\nReturns a list of font paths as a Promise.\n\n### `getProps(path: string) =\u003e Promise\u003cFontProperty[]\u003e`\n\nReturns a list of font properties as a Promise.\n\n### `FontProperty`\n\n```typescript\ntype FontProperty = {\n  fullname: string;\n  family: string;\n  postscriptName: string;\n  monospace: boolean;\n  weight: number;\n  strech: number;\n  style: 'Normal' | 'Italic' | 'Oblique';\n};\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssssota%2Fnode-font-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssssota%2Fnode-font-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssssota%2Fnode-font-kit/lists"}