mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-01-09 06:02:05 -05:00
Use font inlining method from scratch svg render (#427)
This commit is contained in:
parent
fd6268c940
commit
830dd3c9ee
2 changed files with 4 additions and 0 deletions
|
@ -78,6 +78,7 @@
|
|||
"regenerator-runtime": "^0.11.1",
|
||||
"rimraf": "^2.6.1",
|
||||
"scratch-l10n": "^2.0.0",
|
||||
"scratch-svg-renderer": "0.1.0-prerelease.20180510171850",
|
||||
"style-loader": "^0.21.0",
|
||||
"svg-url-loader": "^2.3.2",
|
||||
"tap": "^11.1.0",
|
||||
|
|
|
@ -7,6 +7,8 @@ import Formats from '../lib/format';
|
|||
import Modes from '../lib/modes';
|
||||
import log from '../log/log';
|
||||
|
||||
import {inlineSvgFonts} from 'scratch-svg-renderer';
|
||||
|
||||
import {trim} from '../helper/bitmap';
|
||||
import {performSnapshot} from '../helper/undo';
|
||||
import {undoSnapshot, clearUndoState} from '../reducers/undo';
|
||||
|
@ -95,6 +97,7 @@ class PaperCanvas extends React.Component {
|
|||
// Get rid of anti-aliasing
|
||||
// @todo get crisp text?
|
||||
svg.setAttribute('shape-rendering', 'crispEdges');
|
||||
inlineSvgFonts(svg);
|
||||
const svgString = (new XMLSerializer()).serializeToString(svg);
|
||||
|
||||
// Put anti-aliased SVG into image, and dump image back into canvas
|
||||
|
|
Loading…
Reference in a new issue