exupero / saveSvgAsPng

Save SVGs as PNGs from the browser.
MIT License
1.09k stars 362 forks source link

Add automatic font-face embedding #29

Open nsonnad opened 9 years ago

nsonnad commented 9 years ago

As discussed in #24, PNG downloading does not work. However the in-browser test does pass. I'm not sure how bulletproof the XHR code is or whether there might be any cross-domain issues.

rediris commented 8 years ago

@exupero any chance of merging this pull request?

rediris commented 8 years ago

@nsonnad I'm getting a warning in Chrome v45: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/. at line 31: https://github.com/nsonnad/saveSvgAsPng/blob/inline-fonts/saveSvgAsPng.js#L31

exupero commented 8 years ago

These changes don't appear to be working in Firefox. I was able to get a PNG in Webkit with the embedded font.

I'm willing to merge with the synchronous requests and refactor them to be async later, but it should work in Firefox. I'm getting the same synchronous request warning as Chrome, but no errors, so I don't have any other pointers to what's not working.

rediris commented 8 years ago

Yes, I'm getting "GET" errors in Firefox's console. Evidently something about the font relative URL is getting handled differently by FF.