node-canvas

Node canvas is a Cairo backed Canvas implementation for NodeJS.

Downloads
10.2M
Stars
9.9K
Committers
177

Bot releases are hidden (Show)

node-canvas - v2.11.2 Latest Release

Published by chearon over 1 year ago

Note: this is the first version with prebuilds for Node.js v20.

Fixed

  • Building on Windows in CI (and maybe other Windows configurations?) (#2216)
node-canvas - v2.11.1

Published by chearon over 1 year ago

Fixed

  • Add missing property canvas to the CanvasRenderingContext2D type
  • Fixed glyph positions getting rounded, resulting text having a slight letter-spacing effect
  • Fixed ctx.font not being restored correctly after ctx.restore() (#1946)
node-canvas - v2.11.0

Published by zbjornson almost 2 years ago

Fixed

  • Replace triple-slash directive in types with own types to avoid polluting TS modules with globals (#1656)
node-canvas - v2.10.2

Published by zbjornson almost 2 years ago

Fixed

  • Fix Assertion failed: (object->InternalFieldCount() > 0), function Unwrap, file nan_object_wrap.h, line 32. (#2025)
  • textBaseline and textAlign were not saved/restored by save()/restore(). (#1936)
  • Update nan to v2.17.0 to ensure Node.js v18+ support.

Changed

  • Improve performance and memory usage of save()/restore().
  • save()/restore() no longer have a maximum depth (previously 64 states).
node-canvas - v2.10.1

Published by zbjornson about 2 years ago

Fixed

  • Fix actualBoundingBoxLeft and actualBoundingBoxRight when textAlign='center' or 'right' (#1909)
  • Fix rgba(r,g,b,0) with alpha to 0 should parse as transparent, not opaque. (#2110)
node-canvas - v2.10.0

Published by zbjornson about 2 years ago

Added

Fixed

  • rgba(r,g,b) with no alpha should parse as opaque, not transparent. (#2029)
  • Typo in PngConfig.filters types. (#2072)
  • createPattern() always used "repeat" mode; now supports "repeat-x" and "repeat-y". (#2066)
  • Crashes and hangs when using non-finite values in context.arc(). (#2055)
  • Incorrect context.arc() geometry logic for full ellipses. (#1808, (#1736))
  • Added missing deregisterAllFonts to the Typescript declaration file (#2096)
  • Add User-Agent header when requesting remote images (#2099)
node-canvas - v2.9.3

Published by zbjornson over 2 years ago

Fixed

  • Wrong fonts used when calling registerFont multiple times with the same family name (#2041)
node-canvas - v2.9.2

Published by zbjornson over 2 years ago

Fixed

  • All exports now work when Canvas is used in ES Modules (ESM). (#2047)
  • npm rebuild will now re-fetch prebuilt binaries to avoid NODE_MODULE_VERSION mismatch errors. (#1982)
node-canvas - v2.9.1

Published by zbjornson over 2 years ago

Fixed

  • Stringify CanvasGradient, CanvasPattern and ImageData like browsers do. (#1639, #1646)
  • Add missing include for toupper.
  • Throw an error instead of crashing the process if getImageData or putImageData is called on a PDF or SVG canvas (#1853)
  • Compatibility with Typescript 4.6
  • Near-perfect font matching on Linux (#1572)
  • Fix multi-byte font path support on Windows.
node-canvas - v2.9.0

Published by zbjornson almost 3 years ago

Changed

  • Refactor functions to classes.
  • Changed DOMPoint() constructor to check for parameter nullability.
  • Changed DOMMatrix.js to use string literals for non-special cases.
  • Remove semicolons from Dommatrix.js.
  • Update nan to v2.15.0 to ensure Node.js v14+ support.
  • Clean up inf/nan macros and slightly speed up argument checking.

Added

  • Added deregisterAllFonts method to free up memory and reduce font conflicts.

Fixed

  • Support Apple M1 Homebrew install that puts canvas install library files in /opt/homebrew/lib
node-canvas - v2.8.0

Published by zbjornson over 3 years ago

Changed

  • Upgrade dtslint
  • Upgrade node-pre-gyp to 1.0.0. Note that if you are using special node-pre-gyp
    features like node_pre_gyp_accessKeyId, you may need to make changes to your
    installation procedure. See https://github.com/mapbox/node-pre-gyp/blob/master/CHANGELOG.md#100.
  • Add Node.js v16 to CI.
  • The C++ class method nBytes() now returns a size_t. (Because this is a C++
    method only, this is not considered a breaking change.)

Added

  • Add support for inverse() and invertSelf() to DOMMatrix (#1648)
  • Add support for context.getTransform() (#1769)
  • Add support for context.setTransform(dommatrix) (#1769)

Fixed

  • Fix actualBoundingBoxLeft and actualBoundingBoxRight returned by measureText to be the ink rect (#1776, fixes #1703).
  • Fix Pango logging "expect ugly output" on Windows (#1643)
  • Fix benchmark for createPNGStream (#1672)
  • Fix dangling reference in BackendOperationNotAvailable exception (#1740)
  • Fix always-false comparison warning in Canvas.cc.
  • Fix Node.js crash when throwing from an onload or onerror handler.
node-canvas - v2.7.0

Published by zbjornson over 3 years ago

Note: This is the first prebuild served from Automattic/node-canvas. Previous release prebuilds are served from https://github.com/node-gfx/node-canvas-prebuilt/releases.

Package Rankings
Top 4.68% on Proxy.golang.org
Top 0.45% on Npmjs.org
Top 5.79% on Repo1.maven.org
Badges
Extracted from project README
NPM version