SVG
SVG copied to clipboard
Text no rendering correctly, .svg works in Edge and Chrome
Description
Rendering the attached .svg file fails with the text shown as black rectangles. Image looks ok in Chrome and Edge, the text should be a sans serif font. It was exported from OpenOffice Draw.
Example data
Used Versions
Svg v3.4.7 from nuget Windows 10 .net 8.0
Could you explain the issue more detailed? As far as I understand : You export a svg from openoffice. Then you want to import it via SVG.net in a c# application, but the text is not shown (after exporting it from there?). Are the text elements missing? Or are they just not visible because the background has the same color as the text. And what do you mean by "image looks ok in edge", does it have the same text-missing error in firefox?
The .svg is attached to this Issue.
The C# application using svg.net shows:
Edge, Chrome and Firefox all render the .svg as shown here:
How do you view the SVG in VS? And you save this via svg.net and then it is shown correctly? Did you inspect the single SVG elements after reading in VS? Do the text areas have a background-color or sth. suspicious?
How do you view the SVG in VS?
Visual Studio? In code?
SvgDocument svg= SvgDocument.Open(path);
float width = SvgDocument.Width - SvgDocument.X;
float height = SvgDocument.Height - SvgDocument.Y;
Bitmap bitmap = svg.Draw((int)width, (int)height);
And you save this via svg.net and then it is shown correctly?
Still looks ok if saved with svg.Write(savepath)
Did you inspect the single SVG elements after reading in VS? Do the text areas have a background-color or sth. suspicious?
I’m not doing any inspection just converting to a Bitmap and displaying.