Skip to content

feat: support Takumi v2 compatibility#635

Merged
harlan-zw merged 3 commits into
mainfrom
feat/takumi-v2-compat
Jun 24, 2026
Merged

feat: support Takumi v2 compatibility#635
harlan-zw merged 3 commits into
mainfrom
feat/takumi-v2-compat

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Linked issue

https://takumi.kane.tw/docs/upgrade/v2

Type of change

  • Documentation
  • Bug fix
  • Enhancement
  • New feature
  • Chore
  • Breaking change

Description

Adds Takumi v2 support without dropping v1. module.ts detects the installed Takumi major and passes that metadata into the runtime compatibility payload, so the renderer can choose the right API at runtime.

The Takumi renderer keeps the v1 loadFont path and uses v2 render-local fonts and images. It still fetches fonts and assets before rendering, which keeps Cloudflare Workers and other non-standard runtimes from depending on Takumi to fetch those resources.

The test pipeline now runs Takumi e2e coverage against v1 and v2, with a pixel compare path for representative PNG output.

Testing

  • pnpm lint && pnpm typecheck && pnpm build
  • pnpm run test:takumi:e2e:matrix
  • pnpm run test:takumi:e2e:compare

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nuxt-og-image@635

commit: 346c526

@harlan-zw harlan-zw merged commit 065ac3e into main Jun 24, 2026
11 checks passed
@harlan-zw harlan-zw deleted the feat/takumi-v2-compat branch June 24, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant