Repository navigation
fix: support @napi-rs/canvas 1.0.12+ and require ^1.0.13 - #103
Merged
Merged
Conversation
With font families now quoted, @napi-rs/canvas 1.0.13 renders the whole visual gallery and every catalogued, Google Fonts and self-registered family without tofu, with layout and line breaks unchanged. The one visible difference is a fix: variable fonts such as Noto Sans JP and Noto Sans SC now honour their weight axis, so regular text is no longer drawn at the thin default instance and markdown bold is real bold. Require ^1.0.13 so every install renders the same way, run CI against it, and add a real-canvas test that fails if ctx.font rejects a font shorthand built by fontString().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #102, which capped
@napi-rs/canvasbelow 1.0.12. With font family names quoted, the latest release works, so this lifts the cap.Verification (canvas 1.0.8 vs 1.0.13)
M PLUS 1p,BIZ UDPGothic,Zen Kaku Gothic New,Kosugi Maru,Noto Serif JP), and fonts registered withregisterFromPath()/registerFromURL()under aliases such as2nd Custom FontandO'Brien Sans. No tofu and no render failures on either version.npm run visual: 145/145 ok.Changes
@napi-rs/canvas:>=1.0.8 <1.0.12→^1.0.13, and the lockfile now resolves 1.0.13 so CI runs against it.ctx.fontback after assigningfontString()output for families that need quoting. With the quoting removed, it fails on 1.0.13.textStyle.tscomment that said variable fonts only expose their default instance.The gallery in
docs/visual/is regenerated by the release workflow.