This code inserts an SVG into a word document. The produced word document has an SVG that has its text completely misaligned. Can you have a look please. The code is:
FontSettings.getDefaultInstance().setFontsSources(new FontSourceBase[] { new SystemFontSource(), new FolderFontSource("fonts", true) });
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
String svgString = Files.readString(Paths.get("svg/input_misaligned.svg"));
builder.insertImage(svgString.getBytes(StandardCharsets.UTF_8));
doc.save("output.docx");
It loads the fonts from the fonts subdirectory. Those are required to reproduce the issue. It also loads the SVG from the svg folder.
We are using Aspose.Words for Java 20.6.
The data is in the attached zip file.
data.zip (694.3 KB)