I have confirmed that I have “Segoe UI Emoji” installed on my desktop. I am using Microsoft Office Professional Plus 2016.
If I explicitly change the format of the {Assigned} to “Segoe UI Emoji”, the generated document displays the emoji correctly.
If I set the format of the {Assigned} to Times new Roman or Calibri, the generated document doesn’t display the emoji correctly.
I noticed that Aspose was able to automatically format the Chinese characters in the string as “DengXian”. Unfortunately, it was not able to do the conversions for emoji.
It seems that MS Word 2016 behaves differently at your end and out end. We are using MS Word 2016 English version at our side. MS Word 2016 displays the emoji correctly at our end.
Moreover, it seems that it is not a bug. The template document contains the tag {Assigned} with font name ‘Times New Roman’. Aspose.Words sets the font name of inserted text as ‘Times New Roman’.
As you can see in my generated document, the first 2 Chinese characters was automatically converted to DengXian(body) format while the rest of the characters remain as Calibri.
Your input document has tag {Assigned} and its style is “Title” that has font name ‘Times New Roman’.
In your shared document “Generated.docx” (generated by Aspose.Words) has style for same paragraph as ‘Title’ and its font name is ‘Times New Roman’.
You can check it by unzipping document. Please change the extension of document from .docx to .zip and unzip the document. You can find the detail of Emoji in document.xml. Please check the attached image for detail. generated document.xml.png (29.9 KB)
So, Aspose.Words generates the document Generated.docx correctly.
It seems that you are using different document or MS Word behaves differently. We suggest you please check the same document at some other system. Moreover, please unzip your document and check the document.xml as shared above.
Hope this answers your query. If you still face problem, please let us know.
The generated document.xml does display correctly on IE. However, it doesn’t display correctly on MS Word. Is there some metadata that we can add to the generated document that will make MS word know that it needs to fall back to other fonts? We are hoping to upgrade our ASPOSE version, however it is hard to justify if we can’t get this resolved.
It looks like we are dealing with a similar issue as:
With the example data from that post, I have received quite a few boxes instead of the correct fonts.
I have tried to explicitly convert the text to UTF-8 encoding before insert, but it didn’t help.
Please find the screenshot of the document.xml. image.png (47.3 KB)
Here is my OS information:
OS Name: Microsoft Windows 10 Enterprise
Version: 10.0.17134 Build 17134
I do have the necessary fonts installed on my desktop. Is it something to do with Office Word setting? Since the same document works on your desktop but not on my desktop. Unfortunately, our organization deploys a standard configuration to all desktops. It means that all desktops in our organization will not be able to see the emoji correctly unless we are able to pinpoint what need to be changed in the setting.
Thanks for sharing the detail. The document.xml is correct at your end. The style of Emoji is also correct. MS Word should display the Emoji correctly. Have you checked the same document at different systems? Please check it and share your findings here for our reference. Thanks for your cooperation.
Aspose.Words writes the Emoji into document correctly and it is visible in document.xml. It seems that this issue is related to MS Word. Could you please share the complete version of MS Word as shared in attached image? office version.png (18.0 KB)
Thanks for sharing the detail. It seems that this issue is related to MS Word. Please upgrade to the latest version of MS Word 2016. Hope this helps you.
We have logged this problem in our issue tracking system as WORDSNET-19668. You will be notified via this forum thread once there is an update available on it. We apologize for your inconvenience.
As this is the standard version my organization is currently using, there is no way for end user to upgrade their word version. I will pass the finding along the chain and hope for the best.
Thanks for the detail. Currently, this issue is under analysis phase. We will inform you via this forum thread once there is an update available on this issue.
I think we have established last Dec that Aspose.Words .Net 19.11.0 also works with newer version of MS Word 2016. It is not working with the version of MS Word that my organization has chosen to use. We can’t upgrade the version as it locked by the IT department. The new version (20.1) didn’t fix it either.
Thanks!