Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 04 Oct 13:23
· 24 commits to main since this release
957e906

More of resvg, usvg and fontdb exposed as they are. Every change adds to the API, nothing is removed or renamed.

New

  • Image.size: the encoded image's own size, which can differ from the element's width/height. (#96)
  • toString({ indent, attributesIndent }): number | 'tabs' | 'none', the output formatting usvg's writer offers. An unknown value throws. (#96)
  • ClipPath.clipPath() / Mask.mask(): a clip path or mask applied to another one. (#97)
  • PositionedGlyph.font: the face that drew a glyph, read from its own document's database. (#97)
  • FontDatabase.familyName(family): what a generic keyword such as serif resolves to in this database. (#98)
  • FontDatabase.faceSource(face): { kind: 'binary' | 'file' | 'sharedFile', path?, index }. (#98)

Fixed

  • faceOf(glyph) checks where the glyph comes from. A glyph laid out against another font database now returns null. Until now, two databases holding the same font issued the same keys, so faceOf could answer with an unrelated face. (#97)
  • Nodes reached through a definition (pattern, mask, clip path…) keep their document. Their clipPath() / mask() now resolve instead of returning null, and their renderPng() reports to doc.takeLogs(). (#97)
  • SvgNode.clipPath() / mask() find the definition by identity. Matching by id missed definitions without one and could pick a namesake. (#97)

What's Changed

  • ci: drop the NPM_TOKEN fallback, trusted publishing proven by 0.4.1 by @p8nut in #95
  • feat: Image.size, toString indent and attributesIndent by @p8nut in #96
  • feat: nested clip paths and masks, glyph.font with provenance by @p8nut in #97
  • feat: FontDatabase.familyName and faceSource by @p8nut in #98
  • chore(release): 0.5.0 by @p8nut in #99

Full Changelog: v0.4.1...v0.5.0