Font substitution warnings

Hi,


I am using the mechanism described on the following page in order to generate and log warnings for font substitution:

It gives me the warning and tells me the font that was substituted and in which cell that substitution took place. I however have a usecase where I want to figure out which font is now currently being used in place of the font that was substituted.


So for example, I can figure out that Times New Roman in Sheet1!A14 was substituted from the current format of the warning message, but how do I figure out which font was used in place of Times New Roman in Sheet1!A14?

Thanks.

Hi,


Thanks for your posting and using Aspose.Cells.

In recent versions, we have added Workbook.GetFonts() method. It returns all the fonts used in your workbook, so it will give you idea, how many and what fonts are required by your workbook. Please see the following article for your reference.


When you render your pdf, then you can see all the fonts used inside your pdf by clicking on the

File > Properties > Fonts

in the Adobe Acrobat Reader, please see the screenshot attached with this post.

Hi,


Moreover, the warnings for font substitution feature was originally designed to let the users know there are some fonts missing which should be installed or added to font(s) dirs. (e.g. by FontConfigs.setFontFolder API). There are cases that one cell has more than one fonts setting (e.g. rich text, etc.) and in other cases where a font can be substituted to multi-fonts if text is special. Please note it might not be able to collect every substituted fonts and return to the users.

Thank you.