We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Font changed in rendered image from chart

Hi,

When rendering an Excel chart, I noticed the font has been changed in the output image.

Code:
var workbook = new Workbook(@“test.xlsx”);
var options = new ImageOrPrintOptions
{
ImageFormat = ImageFormat.Emf,
OnlyArea = false,
TextRenderingHint = TextRenderingHint.ClearTypeGridFit,
OnePagePerSheet = true,
Transparent = true
};
var sheet = workbook.Worksheets[0];
sheet.Charts[0].ToImage(@“out.emf”, options);

I’ve attached the test file, output and a screenshot for your reference. You can find the font has been changed (it’s especially visible on the character ‘g’). Could you please look into this?
test.zip (71.6 KB)
screenshot.png (17.5 KB)

Edit: for your convenience I have attached the font (Source Sans Pro) file I’m using in the chart, in case you don’t have it already.

source-sans-pro.zip (1.1 MB)

Thanks,

@ServerSide527,

Thanks for the template file, sample code and font files.

After installing the font on my pc, I opened the Excel file into MS Excel 2013. See the screenshot on how it looks in MS Excel:

I think Aspose.Cells’ rendered image or PDF is almost same as the chart shown in MS Excel.

Hi,

I have double-checked this and it turns out the font was not installed properly on my own test machine. I’ve reinstalled the font and the behaviour is now consistent. I will let you know if I observed any problems but it seems good now. Thanks very much!

@ServerSide527,

Good to know that you have sorted out your issue by re-installing the font files. Feel free to write us back if you need further help or have some other issue or queries, we will be happy to assist you soon.