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

Free Support Forum - aspose.com

Font.Equals method does not work!

Capture.PNG (3.7 KB)
I compared the font from two documents, where the font family was different, but


returned true.

Changing the code to


while paused at a breakpoint returns false.


Thanks for the screenshot and details.

Could you provide template file(s) and sample code (runnable) to reproduce the issue on our end, we will check it soon.

Dear Amjad,

ShapeFontChanges.zip (12.9 KB)

The only code you need is shown above.

Many thanks,


Thanks for the template file(s) and further details.

Which version of the product you are using? I have tested using our latest version/fix: Aspose.Cells for .NET v19.1.3 (attached), it works fine. I used the following sample code to evaluate your issue:
Sample code:

string filePath1 = @"e:\test2\ShapeChangesOriginal.xlsx";
            string filePath2 = @"e:\test2\ShapeChangesFontType.xlsx";

            Workbook workbook1 = new Workbook(filePath1);
            Workbook workbook2 = new Workbook(filePath2);

            ShapeCollection shapes1 = workbook1.Worksheets[0].Shapes;
            ShapeCollection shapes2 = workbook2.Worksheets[0].Shapes;

            Shape originalShape = shapes1[0];
            Shape modifiedShape = shapes2[0];
            Console.WriteLine(originalShape.Font.Name.Equals(modifiedShape.Font.Name)); //False

Aspose.Cells19.1.3 For .Net2_AuthenticodeSigned.Zip (4.7 MB)
Aspose.Cells19.1.3 For .Net4.0.Zip (4.8 MB)

Hi Amjad,

thanks for your response. I am using version We would prefer NOT to update to the latest assembly, because a breaking change to the way that cell borders are reported has been introduced.

Many thanks,


It looks like a bug in older version which was fixed in newer versions later on. I am afraid, we cannot evaluate issues or figure out issues in older versions, the fixes are only based on latest APIs set. We recommend you to kindly upgrade to latest versions of the product.

Well, the behavior should be correct and change is inevitable. If you think this is not correct behavior, provide more details with screenshots, sample code and template files, we will check it soon.