Skip to content

Commit

Permalink
fix safari png text
Browse files Browse the repository at this point in the history
  • Loading branch information
alixander committed Sep 4, 2024
1 parent 98b30aa commit 7bb113e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/js/modules/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ async function exportPNG() {
const width = parseFloat(viewBox[2]) * window.devicePixelRatio;
const height = parseFloat(viewBox[3]) * window.devicePixelRatio;

const encoded =
"data:image/svg+xml;base64," +
btoa(unescape(encodeURIComponent(new XMLSerializer().serializeToString(svgEl))));
const blob = new Blob([new XMLSerializer().serializeToString(svgEl)], {type: 'image/svg+xml'});
const encoded = URL.createObjectURL(blob);

const tempImg = new Image();
const loadImage = () => {
Expand Down

0 comments on commit 7bb113e

Please sign in to comment.