This repository was archived by the owner on Aug 16, 2026. It is now read-only.
Releases: un-es/canvas-npmmirror
Releases · un-es/canvas-npmmirror
Release list
v3.2.3
3.2.3
Fixed
- Fix building with gcc (Automattic#2559)
3.2.2
Fixed
- Fix dangling env pointer in image MIME data cleanup (Automattic#2550)
- Fix
ctx.directionnot affected byctx.saveandctx.restore - Preserve rest of PDF pages when changing width and height (Automattic#2538)
- Several security fixes for untrusted inputs to getImageData and putImageData. Thanks to Ethan Kim for the report.
3.2.1
- Fix error message HTTP response status code in image src setter
roundRect()shape incorrect when radii were large relative to rectangle size (Automattic#2400)- Reject loadImage when src is null or invalid (Automattic#2304)
- Fix compilation on GCC 15 by including (Automattic#2545)
3.2.0
Added
- Added
ctx.langto set the ISO language code for text
3.1.2
Fixed
- Fix crash when setting width/height on PDF, SVG canvas (Automattic#2520)
3.1.1
Fixed
- Fix a crash when SVGs without width or height are loaded (Automattic#2486)
- Fix fetching prebuilds during installation on certain newer versions of Node (Automattic#2497)
- Fixed issue with fillText that was breaking subsequent fillText calls (Automattic#2171)
- Fix svg rendering when the image is resized (Automattic#2498)
- Fix measureText with direction rtl textAlign start/end
- Fix a crash in Node 24, due to external memory API change (Automattic#2514)
3.1.0
Changed
- Replaced
simple-getwithNode.js builtinfetch(Automattic#2309) ctx.fonthas a new C++ parser and is 2x-400x faster. Please file an issue if you experience different results, as caching has been removed.- The restriction of registering fonts before a canvas is created has been removed. You can now register a font as late as right before the
fillTextcall (#1921)
Added
- Support for accessibility and links in PDFs
ctx.directionis implemented:'rtl'or'ltr'set the base direction of textctx.textAlign'start'and'end'are now'right'and'left'whenctx.direction === 'rtl'
Fixed
- Fix a crash in
getImageDatawhen the rectangle is entirely outside the canvas. (#2024) - Fix
getImageDatacropping the resultingImageDatawhen the given rectangle is partly outside the canvas. (#1849)
3.0.1
Fixed
- Fixed accidental depenency on ambient DOM types
v3.0.0
This release notably changes to using N-API. 🎉
Breaking
- Dropped support for Node.js 16.x and below.
Changed
- Migrated to N-API (by way of node-addon-api) and removed libuv and v8 dependencies
- Defer the initialization of the
opvariable to thedefaultswitch case to avoid a compiler warning. (Automattic#2229) - Use a
defaultswitch case with a null statement if some enum values aren't suppsed to be handled, this avoids a compiler warning. (Automattic#2229) - Migrate from librsvg's deprecated
rsvg_handle_get_dimensions()andrsvg_handle_render_cairo()functions to the newrsvg_handle_get_intrinsic_size_in_pixels()andrsvg_handle_render_document()respectively. (Automattic#2229) - Avoid calling virtual methods in constructors/destructors to avoid bypassing virtual dispatch. (Automattic#2229)
- Remove unused private field
backendin theBackendclass. (Automattic#2229) - Add Node.js v20 to CI. (Automattic#2237)
- Replaced
dtslintwithtsd(Automattic#2313)
Added
- Added string tags to support class detection
Fixed
- Fix a case of use-after-free. (Automattic#2229)
- Fix usage of garbage value by filling the allocated memory entirely with zeros if it's not modified. (Automattic#2229)
- Fix a potential memory leak. (Automattic#2229)
v2.11.2
Fixed
- Building on Windows in CI (and maybe other Windows configurations?) (Automattic#2216)
v2.11.0
Fixed
- Replace triple-slash directive in types with own types to avoid polluting TS modules with globals (#1656)
v2.10.2
Fixed
- Fix
Assertion failed: (object->InternalFieldCount() > 0), function Unwrap, file nan_object_wrap.h, line 32.(#2025) textBaselineandtextAlignwere not saved/restored bysave()/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).
v2.10.1
v2.10.0
Added
- Export
pangoVersion ctx.roundRect()
Fixed
rgba(r,g,b)with no alpha should parse as opaque, not transparent. (#2029)- Typo in
PngConfig.filterstypes. (#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
deregisterAllFontsto the Typescript declaration file (#2096) - Add
User-Agentheader when requesting remote images (#2099)