Skip to content

Conversation

@Omarelsherif010
Copy link
Collaborator

I have added my own SVGs and tried rendering them but faced a problem that said "not a valid glyph", so I decided to test all glyphs already on the directory and found that most of them show up with the same error.

I think my SVG will work when we solve a problem related to the glyph's directory as it sounds like the library couldn't see my added SVGs files.

I have attached screenshots of the problem

@chofski
Copy link
Contributor

chofski commented Aug 12, 2022

The problem with your glyph is that it is not a valid Parametric SBOL Visual glyph. This is because some of the details in the header are missing. If you look at one of the example glyphs (e.g., CDS.svg) from the glyphs folder you'll see there are extra entries at the top. Specifically,

glyphtype="CDS" terms="SO:0000316" parametric:defaults="arrowbody_height=15;arrowhead_width=7;width=30;height=15"

If you set these correctly in your it should work.

@Omarelsherif010
Copy link
Collaborator Author

Omarelsherif010 commented Aug 12, 2022

In fact, I did.
I have two versions of my SVGs added to the repo, one on the Omar_work directory and the other in the glyph directory. I did that because I thought that all glyphs should be in the same directory in order for the load_glyphs_from_path function to see it.

In the glyph directory version, I have added glyphtype and parametric defaults but don't know what to do with terms so I tried to give the same value of CDS but unfortunately didn't work

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 this pull request may close these issues.

2 participants