Skip to content

Entity references not supported #96

@eirikbakke

Description

@eirikbakke

Greetings! Thank you very much for authoring the excellent JSVG library. In apache/netbeans#7941, we are in the process of switching the NetBeans IDE from Batik to JSVG for icon rendering.

I encountered one problem that was easy to work around; I thought I would document it here in case anyone else encounters it. Feel free to close the issue if it's not worth fixing.

Bug:

SVG files generated by Adobe Illustrator using the "Style Attributes (Entity References)" option show up with correct shapes, but all-black, when rendered with JSVG.

image

Now as it turns out, in recent versions of Adobe Illustrator, the Entity References option is now explicitly labeled as deprecated. So it may not really be necessary to support these kinds of SVGs. The problem could occur when trying to load older SVG files, though.

illustrator_styleattentityrefs

Workaround:

The easy workaround is to simply use another setting when generating the SVG file from Illustrator. The two other settings available are "Style Elements" and "Style Attributes", and they both seem to be working fine with JSVG.

I have attached SVGs generated using each of the three options in case it is useful. The three files were all generated with the same recent version of Adobe Illustrator (version 28.7.2). The "findDropdown_styleattentityrefs.svg" file is the one that does not work with JSVG.

findDropdown_styleattentityrefs.svg: findDropdown_styleattentityrefs
findDropdown_styleattributes.svg: findDropdown_styleattributes
findDropdown_styleelements.svg: findDropdown_styleelements

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions