-
Notifications
You must be signed in to change notification settings - Fork 96
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
Allow change of svg-to-PNG converter [was: Why not use "svg2png" , pure node without JAVA depend] #59
Comments
The reason is that svg2png depends on PhantomJS and one of core requirements of MathJax-node was to get away from PhantomJS. AFAIK, there is no pure JS svg2png converter out there. In our experience, Batik performance is better and more stable compared to PhantomJS (but that might be worth re-evaluating). In any case, we should make it easier to switch converters. I'm not sure how the others feel but simply dropping Batik does not seem ideal to me at this point. |
@pkra Thanks for you reply, close this issue. |
Let me re-open and rename this. I definitely want us to abstract the PNG conversion; it should be as converter independent as possible. Since svg2png is authord by Domenic it would be a good model to follow for an NPM bridge to Batik. |
👍 |
See also #65 (comment) |
👍 svgexport works great |
@SamyPesse see my earlier comment regarding our original requirements. |
I agree that both solutions java and phantomjs are not ideal. |
Some recent observations
|
Note: I haven't actually tested if the canvas solution for jsdom would be sufficient. |
Some quick notes from my end:
|
My 2 cents here would be to develop an extension point for MathJax so that people can hook up and test whatever suits them better, while still having a sane default. What is that sane default is arguable, ofc, but the way I see it is that it's sane if it doesn't introduce many (especially binary) external dependencies regardless of the performance penalties or feature set. These could be then mitigated on a case-per-case basis with specialised converters. |
See #174 for a first attempt. |
Closed in favor of #205. |
I hava some trouble in my vps about java environment configuration, and i find the node package "svg2png" and modify some code, i'll submit a pull request about this for a review.
sorry for my poor english.
The text was updated successfully, but these errors were encountered: