SharpVectors.Dom.DomException: 'Style declaration ending bracket missing'
See original GitHub issueDescription
In a WPF with MVVM paradigm, I’m having this bug that should not happen (did not see any missing bracket).
SharpVectors.Dom.DomException: ‘Style declaration ending bracket missing’
Example data
XAML: <Grid> <svgc:SvgCanvas Source=“{Binding SvgImage}”/> </Grid>
Interface extract of the VM:
public Uri SvgImage {get;set;}
The full svg file code:
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.3 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='76.712329 54.739125 35.134809 11.637565'>
<style type='text/css'>
<![CDATA[
@font-face{font-family:cmex10;src:url(data:application/x-font-woff;base64,d09GRgABAAAAAAQcAA0AAAAABXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABoAAAAciDNqdU9TLzIAAAFMAAAARgAAAFY3q0qWY21hcAAAAZQAAAA+AAABQgAP4/1jdnQgAAAB1AAAAAQAAAAEACEArWdhc3AAAAHYAAAACAAAAAj//wADZ2x5ZgAAAeAAAADLAAAA4JAgrBVoZWFkAAACrAAAADIAAAA2Fh3JN2hoZWEAAALgAAAAIAAAACQDi/z9aG10eAAAAwAAAAAQAAAAEAWIAFlsb2NhAAADEAAAAAoAAAAKAJgAUG1heHAAAAMcAAAAHwAAACAASABhbmFtZQAAAzwAAAC8AAABIJGm5j9wb3N0AAAD+AAAACMAAAA3R1dSR3jaY2BgYGQAgsvb7s0A0bfsXN/BaABVcweXAAB42mNgZLzBOIGBlYGBqZNpNwMDQzeEZrzPYMjIBBRlYOVkgAMBBJMhIM01hYHhQdCDIIZzf54zRDGcYwkHCjOC5AAnlw24AAB42mNgYGBmgGAZBkYGELAB8hjBfBYGBSDNAoRA/oOg//8hpPxGqEoGRjYGGJOBkQlIMDGgAkaGYQ8AkB8H7AAAACEArQAAAAH//wACeNpjYGJQZGBg1GQ4x8DMwM6gt5GRQd9mEzsLw1ujjWysd2w2MTMBmQwbmUHCrCDhTexsjH9sNjGCxI1NFUXVjU2VFRk5nh87du6cYg8DI4PF75VMiQwMDPpAc/kYlZXU7RhNTdSUldhERcSMjczMzYTsGe2YjI3E+RghImBZdjYmdkYBThNdDQlhIUkBQUkHPacAYS5NNmF2GQUpdbhggTqnJvufCaUxosySvCJiYqIq+im+aozeoT8j4qUQYmu1/+2MADoCAEa/LFQAeNpjYGRgYABixh97dsbz23xl4GZ+DhRhuGXn+g5OK/5eyZTIcA7I5WBgAokCAGghDJsAAHjaY2BkYGA493slQxTjDQaG/+VMiQwgEWTAAgCPlQWFAdgAIQAAAAAB2AAAAdgAOAAAACgAKAAoAHAAAHjaY2BkYGBgYTBgYGIAARDJyAASc2DQAwkAAAhpAKoAeNpNjU0KwjAQhb+q9QdFXInL4L4l6bJr6QFcuBREYiloC1GhW4/hATyBF3RSg5gwmS8zj/eAMSci/OkxYhG4z5p94Jgpz8BDuW/ZRoOJ6Oed0nOfDavAMUsegYfMeLHFUnLnzAEHW1vezweBgoaaW9edKCyKjBQtPZc6cpFZi/lNPCXyJqLTXVE09a1oXGlVlmqVq+PFtsaD0YlJMp2JZic2jitVF+htfAg7665VUyuTyuc/jK8JH2odJz942mNgYkAGjAzogAUsysTIxJOZV5KaXpSYU5JaUQIAIvIFNQA=) format('woff');}
@font-face{font-family:cmsy7;src:url(data:application/x-font-woff;base64,d09GRgABAAAAAAQoAA0AAAAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABoAAAAciDNqdU9TLzIAAAFMAAAARQAAAFZ2XoDmY21hcAAAAZQAAABCAAABQgAPKMljdnQgAAAB2AAAAAQAAAAEACEBomdhc3AAAAHcAAAACAAAAAj//wADZ2x5ZgAAAeQAAADaAAABAIb1z61oZWFkAAACwAAAADEAAAA2F+HOeWhoZWEAAAL0AAAAHgAAACQGRARtaG10eAAAAxQAAAAQAAAAEA1WAG5sb2NhAAADJAAAAAoAAAAKAKoAVG1heHAAAAM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QwCQABWACdAAA=) format('woff');}
@font-face{font-family:cmmi10;src:url(data:application/x-font-woff;base64,d09GRgABAAAAAAWIAA0AAAAAB0wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABoAAAAciDNqdU9TLzIAAAFMAAAAQgAAAFZWV18AY21hcAAAAZAAAABPAAABUgR/DLBjdnQgAAAB4AAAAAQAAAAEACECeWdhc3AAAAHkAAAACAAAAAj//wADZ2x5ZgAAAewAAAIqAAACqC69n6doZWFkAAAEGAAAADEAAAA2FeDOtWhoZWEAAARMAAAAIAAAACQFRgE2aG10eAAABGwAAAAYAAAAGAjlAJtsb2NhAAAEhAAAAA4AAAAOAgYBPG1heHAAAASUAAAAHwAAACAASgCBbmFtZQAABLQAAAC7AAABIIqX30Bwb3N0AAAFcAAAABgAAAAuAKsAS3jaY2BgYGQAgsvb7s0A0bfsXN/BaABVcweXAAB42mNgZOJjnMDAysDA1MW0h4GBoQdCMz5gMGRkAooysDIzwAAjAxIISHNNAVIpDBVM7/6zMUQxHWQ4C1MDALzHCwMAAHjaY2BgYGaAYBkGRgYQ8AHyGMF8FgYDIM0BhExAOoUhjaHi/38E6//8//P+90J1gQEjGwOcywjSw8SAChgZqAKYgU5DB6wMgwMAAISMDDgAACECeQAAAAH//wACeNpVkctu00AUhmfGjie+xLETO27l+0ychLakbWzHTeMmabi0oqVdIKGqC9ixQ0hIsOIhkFjRV2CVLBBix6obHoEHYNMlO6CM04vEYkZz/v/M6Jv/AARCAOAKOgMcwKA7g2A9n2MeXPRmQulHPucQO4IZV8ilQp5jAf7O57DQYz3U27FOQyj+PD9HZ39ehOgEAAQ6l78Qjz6DLpiy1xNKsGAajbjnQbMKW5RcVZkH2TZCKWsQsAopSZOsLWCBklaa9LMRXNwwMOIr4TNVUi2L53J/5+Tjo+G9sdCjXadcxQouIS1wPGEiqIMt4kU1a+y5bZlDn2QZ6WW+JAjGxeTLy4enB8Fqpm0GSMLyzrhrLaumtrfdjD7QtWStWUZVwGBBehmjDvoG7rMi7o1gmqzCrJ/1456lwgV3P02KP2ABU7KQhpBTOUraRfPt7xg/yuCrp4pUtp+YOtZ8r+4uN6omSQndN8SlB8xRtOmBKJt23a17Cy8Jo+2a6lQgfA9FSX59qpIaR3StHtpBFE/Dd1AUy/zfNxubY6eG6LWRR87zoQgW/C7Lvgq/gmNW3EJfM2O2VGQaRew34Ra5/0/OuIvJXA1m4bNxZPDI3ndNhtqiQ7LbcY+bu62GIiPrMVEaRl+JA9c0bEu1gkFkdWyFk7ZWmhPWInGNo9B2dNh9W+GDmmr6NvUPD+/0N2RJ3svLgU2+rw8qvGfUdLIUENPXsX/3xm45BpvEPw9RZekAAHjaY2BkYGAAYt6sVwzx/DZfGbiZXwBFGG7Zub6D07L/jZk0mA4CuRwMTCBRADABCtUAAAB42mNgZGBgOvjfmCGKyZqB4f9BJg0GoAgKYAMAc/oEfwFsACEAAAAAAU0AAAIIACgB6QA1AjsAHQAAACoAKgAqAIgA6AFUAAB42mNgZGBgYGMIYGBiAAEQycgAEnNg0AMJAAALvwDMAHjaTY1NCsIwEIW/+i+KuBKXwX1L0qVr6QG66FIQiaVgW4j2AB7DA3gCL+ikBjHDZL5MHu8BMy5E+DNgyjrwkB3HwGMWPANPpN7yG43mol/1Ss9DDmwDj9nwCDxhyYscS0nHlRMOclt215NARkvDvZ9OFBZFSoKWuZc+U0tVmN/GUyx3LDrdN1nb3LPWlValiVZ7da7ryngwOjZxqlPRFGLtuImVD/Q2PoTCulvVNsok8vgP42vCB2RzJyMAeNpjYGLAD9iAmJGBicGdwZMhGgADhgD3) format('woff');}
@font-face{font-family:cmmi7;src:url(data:application/x-font-woff;base64,d09GRgABAAAAAARgAA0AAAAABawAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABoAAAAciDNqdU9TLzIAAAFMAAAAQgAAAFZVqF9YY21hcAAAAZAAAABBAAABQgAPByNjdnQgAAAB1AAAAAQAAAAEACECeWdhc3AAAAHYAAAACAAA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zOhsW3GVmvmEe7wEr7kxwb8qSvecZJ66eF2x5ew5k+8p1Ml+LfjcqHc84c/S84MDLc8CGDxcMFU8e3LBwMdXzcRPI6WgZxmlFYVAkRGiZmVRJI78m9Xssl1B6KCo9FnnXDnlnK6OSSKtMlU1TpzJjHcZhohORFOJr6cXHpTkXl0BhbF93rYojWf5JjA78AIZCJmUAAHjaY2BiQAaMDOiABSzKxBANAAEhAGYAAA==) format('woff');}
text.f0 {font-family:cmsy7;font-size:6.973848px}
text.f1 {font-family:cmmi10;font-size:9.96264px}
text.f2 {font-family:cmmi7;font-size:6.973848px}
text.f3 {font-family:cmex10;font-size:9.96264px}
]]>
</style>
<g id='page1'>
<text class='f3' x='76.712329' y='54.739125'></text>
<text class='f0' x='81.416916' y='66.306952'>∞</text>
<text class='f1' x='91.517907' y='62.764633'>f</text>
<text class='f2' x='96.395475' y='64.259013'>x</text>
<text class='f1' x='101.411394' y='62.764633'>dx</text>
</g>
</svg>
Used Versions
3.0.84, nuget
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
C# (CSharp) SharpVectors.Dom.Css CssStyleBlock Examples
C# (CSharp) SharpVectors.Dom.Css CssStyleBlock - 10 examples found. ... SyntaxErr, "Style declaration ending bracket missing"); } return(cssText); }.
Read more >C# (CSharp) SharpVectors.Dom.Css CssRule Examples
C# (CSharp) SharpVectors.Dom.Css CssRule - 12 examples found. ... SyntaxErr, "Style block missing ending bracket"); } break; } else if (css.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I use tex/latex programs to convert mathematical formulas written (in latex language) in a WPF TextBox to dvi file then to svg file, and then draw the result back in WPF.
dvisvgm is open source, it might be interesting for SharpVectors: https://github.com/mgieseki/dvisvgm
The following SVG with path gives the same visual result as the SVG with fonts (at least when opened in a web browser):
@paulushub Great. That’s not a simple issue or simple ecosystem. I managed to bypass those issues by asking dvisvgm not to produce svg fonts but path (with option -n) and this XAML markup:
<svgc:SvgCanvas Source="{Binding SvgImage}" />
SharpVectors in that case works perfectly.
-n, --no-fonts[=variant] If this option is given, dvisvgm doesn’t create SVG font elements but uses paths instead. The resulting SVG files tend to be larger but they are concurrently more compatible with most applications that don’t support SVG fonts yet. The optional argument variant selects the method how to substitute fonts by paths. Variant 0 creates path and use elements. Variant 1 creates path elements only. Option --no-fonts implies --no-styles.