Hello,
to test aspose.diagram i’ve only a page with a rectangle that contains the text “Hello Text”.
Now i want to set the font to another fontname.
I can read the actual font with following code
var fontID = myShape.Chars[0].Font.Value
var fontName = myDiagram.Fonts[fontID - 1].Name
The issued name is Times New Roman.
Now i want to set the font to Arial. I tried the following:
Aspose.Diagram.Font newFont = new Aspose.Diagram.Font();
newFont.Name = "Arial";
int fontIndex = diagram.Fonts.Add(newFont);
foreach (Aspose.Diagram.Char ch in myShape.Chars)
{
ch.Font.Value = fontIndex;
}
After saving the file and open it in Visio the font is still the old one.
Do you have an example to change the font of a shape.
regards
steve