Repository navigation
v0.5.0
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'swidth/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 asserifresolves 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 returnsnull. Until now, two databases holding the same font issued the same keys, sofaceOfcould 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 returningnull, and theirrenderPng()reports todoc.takeLogs(). (#97) SvgNode.clipPath()/mask()find the definition by identity. Matching byidmissed 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