We tested the scenario using following code snippet and were able to notice that text was not rendered correctly.
Aspose.Diagram.Diagram diagram = new Aspose.Diagram.Diagram();
Aspose.Diagram.Page page = diagram.Pages;
string masterName = "Bridge";
diagram.AddMaster(dataDir + "NetworkPeripherals.vssx", masterName);
int PageIndex = 0;
double width = 2, height = 2, pinX = 4.25, pinY = 4.5;
// Add a new rectangle shape
long rectangleId = diagram.AddShape(pinX, pinY, width, height, masterName, PageIndex);
// Set shape properties
Aspose.Diagram.Shape rectangle = page.Shapes.GetShape(rectangleId);
rectangle.XForm.PinX.Value = 5;
rectangle.XForm.PinY.Value = 5;
rectangle.Type = Aspose.Diagram.TypeValue.Shape;
rectangle.Text.Value.Add(new Aspose.Diagram.Txt("Aspose Diagram"));
rectangle.TextStyle = diagram.StyleSheets;
rectangle.Line.LineColor.Value = "#ff0000";
rectangle.Line.LineWeight.Value = 0.03;
rectangle.Line.Rounding.Value = 0.1;
rectangle.Fill.FillBkgnd.Value = "#ff00ff";
rectangle.Fill.FillForegnd.Value = "#ebf8df";
diagram.Save(dataDir + "AddShapeText_out.vsdx", Aspose.Diagram.SaveFileFormat.VSDX);
It seems like the text is being added as per the Style Sheets in the Diagram. However, we need to investigate this scenario in details and for the purpose, we have logged an issue as DIAGRAMNET-51896 in our issue tracking system. We will investigate this scenario in details and keep you posted with the status of its resolution. Please spare us some time.
We are sorry for the inconvenience.