mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 21:42:30 -05:00
Merge pull request #842 from adroitwhiz/bitmap-convert-font-fix
When converting to bitmap, call inlineSvgFonts() on SVG string instead of SVG element
This commit is contained in:
commit
7ead677426
1 changed files with 3 additions and 2 deletions
|
@ -379,8 +379,9 @@ const convertToBitmap = function (clearSelectedItems, onUpdateImage) {
|
|||
// Get rid of anti-aliasing
|
||||
// @todo get crisp text https://github.com/LLK/scratch-paint/issues/508
|
||||
svg.setAttribute('shape-rendering', 'crispEdges');
|
||||
inlineSvgFonts(svg);
|
||||
const svgString = (new XMLSerializer()).serializeToString(svg);
|
||||
|
||||
let svgString = (new XMLSerializer()).serializeToString(svg);
|
||||
svgString = inlineSvgFonts(svgString);
|
||||
|
||||
// Put anti-aliased SVG into image, and dump image back into canvas
|
||||
const img = new Image();
|
||||
|
|
Loading…
Reference in a new issue