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
Text does not render #318
Comments
i have no idea,please tell me |
Hi @centDejan, If you look closer to your
So if you either remove
Attached is updated document that will work for you. Now what is related to the library itself problem is with I am not an expert with parsers, but hopefully someone who is will pick form here and address this very common problem. Thanks |
Dear @haykpetros!
Thank you for taking your time to locate the root of the issue. You did
amaizing job!
Dejan
…On Sat, Aug 12, 2017 at 4:21 PM haykpetros ***@***.***> wrote:
Hi @centDejan <https://github.com/centdejan>,
If you look closer to your tspan elements you will notice that style
attribute contains fill-rule CSS declaration that has no value. So that
is causing parser to fail and not to render rest of your document. Here is
an example from your document:
<tspan x="-62.26" y="10.08" style="stroke: none; stroke-width: 0;
stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter;
stroke-miterlimit: 4; fill: rgb(0,0,0); fill-rule: ; opacity: 1;">T</tspan>
So if you either remove fill-rule declaration completely or add any value
to it, for example nonzero it will render just fine. Here is example that
will render:
<tspan x="-62.26" y="10.08" style="stroke: none; stroke-width: 0;
stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter;
stroke-miterlimit: 4; fill: rgb(0,0,0); fill-rule: nonzero; opacity:
1;">T</tspan>
Attached is updated document that will work for you.
Now what is related to the library itself problem is with public
StyleSheet Parse(string css) method in External\ExCSS\Parser.css (see
line 64) that is not handling this situation properly, because generally
speaking this is a properly formed CSS. So that causes exception and
prevents document from rendering rest of the document, but actually it
should assume a default value for the declaration when no value is
specified.
I am not an expert with parsers, but hopefully someone who is will pick
form here and address this very common problem.
Thanks
s1 - FIXED.zip <https://github.com/vvvv/SVG/files/1219837/s1.-.FIXED.zip>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#318 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGC69VsjRj47CDPKSGmCB6dmFLbut1AAks5sXbTVgaJpZM4NY-py>
.
|
Hi @centDejan, Happy to help you and contribute to this great library! Thanks |
I have created SVG document with the FacbricJS (please find file attached).
However when I would like to render it, it does not render texts inside the file.
Text is shown if file is opened with Inkscape or any other SVG editor...
It there any workaround here?
Would appreciate quick response.
s1.zip
The text was updated successfully, but these errors were encountered: