I embed a 100KB custom font in a generated file, it works but when the final user opens up that file in MS Word and saves any small modification (like a single letter), the file size increases a lot.
The generated file is 101579 bytes, but if I open it in MS Word, add a single letter ‘a’ and save again, it becomes 1755596 bytes.
Original file: open-in-word-modify-and-check-size.docx (99.2 KB)
We have managed to reproduce the same problem on our end. For the sake of any correction in Aspose.Words API, we have logged this problem in our issue tracking system with ID WORDSNET-22423. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.
Regarding WORDSNET-22423, we have completed the analysis of this issue and concluded to close this issue with “not a bug” status. This looks more like a problem with Microsoft Word. In this case, MS Word treats fonts in Themes as used in document, despite the theme is not actually used anywhere in document’s text and thus embeds it into the document.
But, it is not necessary to change the document, you can just open and save it to observe the issue. Also, if you install the custom font in OS and edit document in MS Word, it will save this document with embedded fonts from Themes too.
To avoid this effect, you can set some system font in Themes, as the following: