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

SVG Support #59

Closed
smuglet opened this issue Oct 6, 2018 · 2 comments
Closed

SVG Support #59

smuglet opened this issue Oct 6, 2018 · 2 comments
Labels
question Further information is requested

Comments

@smuglet
Copy link

smuglet commented Oct 6, 2018

Please can someone advise what SVG vesions are support and if there are other limitations. I'v been creating SVG's via Illustrator and not all appear to load. Saving to SVG 1.0 seems the most reliable but they don't seem to contain some basic data in the SVG, such as a size that the class can obtain using ->getWidth() etc.

Thanks.

@meyfa meyfa added the question Further information is requested label Nov 10, 2018
@meyfa
Copy link
Owner

meyfa commented Nov 10, 2018

PHP-SVG should be able to load most element types, even ones that do not have their own classes. It also does not care about attribute names and values and will load them all. Text elements, certain style sheets and scripts might cause problems though.

Methods like getWidth(), getCenterX() and so on are simply shortcuts for getAttribute('width'), getAttribute('cx'), respectively.

Granted, rendering/rasterizing SVGs is a completely different topic. There are a number of issues with that still.

So depending on what you're doing with the loaded files, support can be better or worse. If you want to submit a sample image + code that does not work with PHP-SVG, I can give further guidance.

@meyfa
Copy link
Owner

meyfa commented Nov 29, 2018

I'm assuming this issue is resolved. If not, please reopen it or submit a new one.

@meyfa meyfa closed this as completed Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants