If you know "Blackadder ITC", It looks like this: (TotallyBlackaddder.jpg)
Jane.Bai wrote:Hello,
Sorry that I'm not clear about your intention. I found that the font of the chart legend in "test.pptx" is "Blackadder ITC" rather than Calibri. And what indeed did you do? Get the font and font style and then reset the font? I tried that yet didn't encounter any issue. Please share the entire code and point out the issue.
Below is my testing code.
- Code: Select all
Presentation ppt = new Presentation();
ppt.LoadFromFile(diag.FileName);
IChart Chart = null;
foreach (Shape shp in ppt.Slides[0].Shapes)
{
if (shp is IChart)
{
Chart = shp as IChart;
}
}
var textParagraph = Chart.ChartLegend.TextProperties.Paragraphs[0];
Font font = GetFont(textParagraph);
FontStyle fStyle = GetFontStyle(textParagraph.DefaultCharacterProperties);
textParagraph.DefaultCharacterProperties.LatinFont = new TextFont("Arial Unicode MS");
ppt.SaveToFile("123.pptx", FileFormat.Pptx2010);
Sincerely,
Jane
E-iceblue support team