{"id":15315861,"url":"https://github.com/wobsoriano/unplugin-font-to-buffer","last_synced_at":"2026-05-10T05:32:39.282Z","repository":{"id":103784734,"uuid":"574399108","full_name":"wobsoriano/unplugin-font-to-buffer","owner":"wobsoriano","description":"Import font files as Buffer.","archived":false,"fork":false,"pushed_at":"2023-05-26T16:46:58.000Z","size":98,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T14:47:33.951Z","etag":null,"topics":["nuxt","rollup","satori","unplugin","vite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/wobsoriano.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":"2022-12-05T08:18:16.000Z","updated_at":"2024-08-26T18:40:38.000Z","dependencies_parsed_at":"2024-12-06T09:22:57.311Z","dependency_job_id":"f47837f2-b0b2-498d-855d-fc16de7e9df8","html_url":"https://github.com/wobsoriano/unplugin-font-to-buffer","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"da32555f135896f86eff57a642777a0312f1f992"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/wobsoriano/unplugin-font-to-buffer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Funplugin-font-to-buffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Funplugin-font-to-buffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Funplugin-font-to-buffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Funplugin-font-to-buffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wobsoriano","download_url":"https://codeload.github.com/wobsoriano/unplugin-font-to-buffer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Funplugin-font-to-buffer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259876406,"owners_count":22925338,"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":["nuxt","rollup","satori","unplugin","vite"],"created_at":"2024-10-01T08:52:35.630Z","updated_at":"2026-05-10T05:32:39.237Z","avatar_url":"https://github.com/wobsoriano.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unplugin-font-to-buffer\n\nImport font files as Buffer. Meant to be used with [satori](https://github.com/vercel/satori).\n\n## Install\n\n```bash\npnpm add unplugin-font-to-buffer -D\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eVite\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vite.config.ts\nimport FontToBuffer from 'unplugin-font-to-buffer/vite'\n\nexport default defineConfig({\n  plugins: [FontToBuffer()],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRollup\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// rollup.config.js\nimport FontToBuffer from 'unplugin-font-to-buffer/rollup'\n\nexport default {\n  plugins: [FontToBuffer()],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eNuxt\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// nuxt.config.js\nexport default defineNuxtConfig({\n  // Applied on Nitro only\n  modules: ['unplugin-font-to-buffer/nuxt'],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eWebpack\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// webpack.config.js\nmodule.exports = {\n  /* ... */\n  plugins: [\n    require('unplugin-font-to-buffer/webpack')()\n  ]\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eesbuild\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// esbuild.config.js\nimport { build } from 'esbuild'\nimport FontToBuffer from 'unplugin-font-to-buffer/esbuild'\n\nbuild({\n  plugins: [FontToBuffer()],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n```jsx\nimport satori from 'satori'\nimport Roboto from './lib/fonts/Roboto-Regular.ttf'\n\nconst svg = await satori(\n  \u003cdiv style={{ color: 'black' }}\u003ehello, world\u003c/div\u003e,\n  {\n    width: 600,\n    height: 400,\n    fonts: [\n      {\n        name: 'Roboto',\n        data: Roboto,\n        weight: 400,\n        style: 'normal',\n      },\n    ],\n  },\n)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Funplugin-font-to-buffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwobsoriano%2Funplugin-font-to-buffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Funplugin-font-to-buffer/lists"}