Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External fonts don't work - Upgrade to PhantomJS 2 #27

Closed
davemackintosh opened this issue Dec 14, 2015 · 12 comments · Fixed by #28
Closed

External fonts don't work - Upgrade to PhantomJS 2 #27

davemackintosh opened this issue Dec 14, 2015 · 12 comments · Fixed by #28

Comments

@davemackintosh
Copy link
Contributor

If you're using web fonts, from say Google Fonts they won't appear because there is no wait for resources to finish loading before rendering the image.

Is there any fix for this?

@shakiba
Copy link
Collaborator

shakiba commented Dec 14, 2015

Probably a page load listener should be added before rendering. If it is possible for you please check if you can fix it, otherwise I will try to fix it as soon as I'm free.

@davemackintosh
Copy link
Contributor Author

I'm looking to add support for the load event right now in a fork. Will submit a PR when done.

https://github.com/newworldcode/svgexport
http://www.w3.org/TR/SVG11/interact.html#LoadEvent

@shakiba
Copy link
Collaborator

shakiba commented Dec 14, 2015

That's great, thanks!

@davemackintosh
Copy link
Contributor Author

Well.. What a waste of time that was.. It just turns out that it doesn't support fonts very well.. Need to update to PhantomJS 2.0

http://stackoverflow.com/questions/23404658/how-can-i-use-google-web-fonts-with-phantomjs

@davemackintosh
Copy link
Contributor Author

Working on an update.

@davemackintosh
Copy link
Contributor Author

💥 Got Phantom 2.0 working and fonts are fixed. Will be submitting a PR once the tests are fixed.

@davemackintosh
Copy link
Contributor Author

@shakiba

@davemackintosh davemackintosh changed the title External fonts don't work as export doesn't wait External fonts don't work - Upgrade to PhantomJS 2 Dec 14, 2015
@shakiba
Copy link
Collaborator

shakiba commented Dec 15, 2015

@davemackintosh Thanks, I have been resisting to upgrade to phantomjs 2.0 for a while, but it seems that this time I can not! Please give me just few days.

@davemackintosh
Copy link
Contributor Author

How come you've resisted updating?

@shakiba
Copy link
Collaborator

shakiba commented Dec 15, 2015

The main phantomjs npm package is not upgraded to v2 yet and this issue is still open. I just checked the phantomjs2 npm package, it does not support Windows yet. I will use it in an alpha version, because otherwise svgexport won't be usable in Windows.

@davemackintosh
Copy link
Contributor Author

Looks like that issue has been closed and updated, I think this PR is outdated now that 2.1 is out. I will revisit in the next few days to update the PR.

@shakiba
Copy link
Collaborator

shakiba commented Feb 11, 2016

@davemackintosh Thanks, I appreciate your help. It seems that the package name is also changed to phantomjs-prebuilt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants