Skip to content

Bump @napi-rs/canvas from 1.1.1 to 1.2.1 - #650

Closed
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/napi-rs/canvas-1.2.1
Closed

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/napi-rs/canvas-1.2.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Bumps @napi-rs/canvas from 1.1.1 to 1.2.1.

Release notes

Sourced from @​napi-rs/canvas's releases.

v1.2.1

Highlights

node-canvas registerFont() descriptors and cleanup (#1473)

registerFont(path, { family, weight, style }) now passes weight and style as @font-face descriptors. Families registered one face per call now select the requested regular, bold, italic, or bold italic face correctly, fixing the v1.2.0 regression reported in #1472.

const { registerFont } = require('@napi-rs/canvas/node-canvas')
registerFont('./fonts/Lato-Regular.ttf', { family: 'MyLato', weight: 400 })
registerFont('./fonts/Lato-Bold.ttf', { family: 'MyLato', weight: 700 })

  • Descriptors follow the @font-face grammar, including numeric weights, calc(700), and 'oblique 10deg'. Omitted or invalid fields are auto.
  • An explicit weight, including 'normal', pins a variable font to that weight. Use a range such as '100 900' to preserve its variation axis.
  • Faces declared bold or italic follow their descriptor without adding synthetic bold or italic when the underlying file lacks that style.
  • deregisterAllFonts() removes only the registerFont() registrations owned by the current thread. Registrations made through GlobalFonts and loadFontsFromDir() remain untouched. Worker registrations survive worker exit, matching node-canvas; worker pools should call deregisterAllFonts() before each worker exits.

Behavior change: a non-empty family is now the face’s only name, matching Chrome’s new FontFace(family, ...). Pass family: '' or the embedded family name to register the face under its embedded name.

Chrome-compatible fontVariationSettings and variable-font fixes (#1470)

The non-standard, experimental ctx.fontVariationSettings property now follows Chrome’s CSS font-variation-settings parsing, serialization, and WebIDL coercion:

  • Supports CSS math functions, comments, escaped quotes and backslashes, tags containing commas, duplicate tags with last-value-wins behavior, and ascending tag-order serialization.
  • Invalid values are ignored without corrupting the current font state. Non-string values use WebIDL ToString; Symbol values throw a TypeError.
  • Variable fonts avoid incorrect synthetic bold or italic when fontVariationSettings overrides their wght or slnt axes.
  • .ttc faces preserve their collection index across font cloning and variation paths, including Fontations and DirectWrite.

Skia chrome/m158 (#1469)

Upgrades Skia from chrome/m157 (b94213a11b) to chrome/m158 (37e919d866). The Skia-tied Fontations dependencies are synchronized to font-types 0.12.6, read-fonts 0.45.0, and skrifa 0.48.0. This also updates the Windows Skia build toolchain.

What's Changed

Full Changelog: Brooooooklyn/canvas@v1.2.0...v1.2.1

v1.2.0

Highlights

@font-face descriptors in GlobalFonts and static font-stretch matching (#1464, #1465, #1467)

GlobalFonts.register(font, nameAlias?, descriptors?) and GlobalFonts.registerFromPath(path, nameAlias?, descriptors?) now accept a descriptors object ({ weight, style, stretch }), matching Chrome's new FontFace(name, data, descriptors):

  • Supports CSS values, ranges ('100 900', 'oblique 10deg 20deg', '75% 125%'), calc(), and 'auto'. Invalid descriptors return null without registering; non-object descriptors throw a TypeError.

... (truncated)

Changelog

Sourced from @​napi-rs/canvas's changelog.

1.2.1 (2026-11-25)

Bug Fixes

  • fonts: align fontVariationSettings with Chrome CSS and fix VF edge cases (#1470) (841992a)
  • node-canvas: registerFont descriptors and private cleanup registrations (#1473) (1d6ea39)

Features

1.2.0 (2026-11-20)

Bug Fixes

Features

Commits
  • 040880c 1.2.1
  • 1d6ea39 fix(node-canvas): registerFont descriptors and private cleanup registrations ...
  • 9c622bb chore(deps): update yarn to v4.19.0 (#1471)
  • 841992a fix(fonts): align fontVariationSettings with Chrome CSS and fix VF edge cases...
  • b3698ce feat: chrome/m158 (#1469)
  • 7d290bd 1.2.0
  • 3093c34 feat(text): use DirectWrite and Fontations on Windows in system text renderer...
  • 2dde24a feat(fonts): support @​font-face stretch descriptor and fix static font-stretc...
  • 0e6a445 feat(canvas): add ctx.antialias property (#1466)
  • 25449f5 feat(encode): PNG compressionLevel and filters (#1463)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@napi-rs/canvas](https://github.com/Brooooooklyn/canvas) from 1.1.1 to 1.2.1.
- [Release notes](https://github.com/Brooooooklyn/canvas/releases)
- [Changelog](https://github.com/Brooooooklyn/canvas/blob/main/CHANGELOG.md)
- [Commits](Brooooooklyn/canvas@v1.1.1...v1.2.1)

---
updated-dependencies:
- dependency-name: "@napi-rs/canvas"
  dependency-version: 1.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Dec 1, 2026
@dependabot @github

dependabot Bot commented on behalf of github Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Looks like @napi-rs/canvas is up-to-date now, so this is no longer needed.

@dependabot dependabot Bot closed this Dec 1, 2026
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/napi-rs/canvas-1.2.1 branch December 1, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants