You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR also includes two follow-up commits beyond the original renderer extraction work:
Add crispEdges option for SVG output in JavaScript
Adds a new crispEdges option for SVG rendering in JavaScript. The option supports true, false, and 'auto' (default). In auto mode, shape-rendering="crispEdges" is applied only for whole-number cell sizes, which preserves sharp rendering without introducing geometry distortion for fractional sizes.
Refactor experiment/vt renderers into pluggable modules
Applies the same renderer modularization to the TypeScript-based js/experiment/vt sources. The SVG, table, ASCII, and GIF renderers are moved out of the core module into separate renderer modules, compatibility wrappers are preserved in the main QRCode API, and the TypeScript build/tests are updated accordingly.
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
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.
This PR refactors the rendering layer to make format renderers modular and extensible, while keeping the existing public API backward compatible.
What changed
Motivation
The previous structure made rendering formats tightly coupled to the main module.
This change introduces a more modular renderer architecture:
This also allowed me to substantially rework SVG rendering and extend renderer configuration without breaking existing usage patterns.
Backward compatibility
Compatibility was an explicit goal of this change.
Existing usage is preserved, including:
So projects using the current API should continue to work, while gaining access to the more modular renderer structure.