Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 00:23
· 119 commits to main since this release
b33f3e4

One addition, and the reason it exists.

pendingFonts() has always named the families the database did not carry — the
loud failure. The quiet one is a family that is loaded and still did not draw
the text: a fallback renders, the page looks plausible, and nobody finds out
until it is printed.

const text = doc.node('title').text()
text.chunks[0].spans[0].font.families   // ['Brand Sans', 'DejaVu Sans'] — asked for
doc.faceOf(glyph)?.postScriptName        // 'DejaVuSans' — what actually drew it

Resvg.faceOf(glyph) returns the face that drew a glyph, looked up in the
database the document was parsed with; null means the glyph came from another
document. Font.families returns the families a span asked for, so the
answer has something to be compared against. The browser bench shows both: a
drawn with row, and a warning per substitution.

Nothing breaks. Two additions to the surface; no member changed shape or
left, which is why this is a minor.

Two things that landed earlier and reach npm only now, because a published
README changes only on publish: the README is rewritten around what the project
does rather than what it is, and toString() finally says out loud that it
converts text to paths. The bench is live at
p8nut.github.io/resvg-napi.


What's Changed

  • feat(demo): deploy the bench to GitHub Pages by @p8nut in #36
  • docs: titles that say what they contain, and the examples as images by @p8nut in #35
  • chore(ci): a v* tag creates a GitHub release, and CHANGELOG.md goes by @p8nut in #34
  • chore: dependabot for the actions and the dev dependencies by @p8nut in #37
  • docs: link the deployed demo by @p8nut in #39
  • chore(dependabot): the emnapi family moves in lockstep, majors on their own by @p8nut in #40
  • chore(ci): drop the npm credentials probe by @p8nut in #41
  • chore(dependabot): the CLI is the gate, so the emnapi pins wait for it by @p8nut in #44
  • ci: the wasm job bundles the demo by @p8nut in #47
  • build(deps-dev): bump @napi-rs/cli from 3.8.6 to 3.9.0 in the napi group across 1 directory by @dependabot[bot] in #46
  • build(deps-dev): bump the dev-dependencies group across 1 directory with 2 updates by @dependabot[bot] in #43
  • docs: npm says the same thing as the repo page by @p8nut in #48
  • chore: no tool config in the repository by @p8nut in #49
  • fix: npm's homepage is the README, not the demo by @p8nut in #50
  • docs: the text-as-outlines behaviour has a title of its own by @p8nut in #51
  • feat: every glyph names the face that drew it by @p8nut in #52
  • chore(release): 0.3.0 by @p8nut in #53

New Contributors

Full Changelog: v0.2.0...v0.3.0