Noto Color Emoji not rendering in Aspose Words PDF Export

We are downloading Noto Color Emoji fonts from https://fonts.google.com/selection. We are using it in our code to convert text to PDF using Aspose Words. Our code is as below -

 FontSettings fontSettings = new FontSettings();
  
 FontSourceBase emojisFont = new StreamFontSource() {
     @Override
     public InputStream openFontDataStream() throws Exception {
 	 return new ByteArrayInputStream(NOTO_COLOR_EMOJI);
     }
 };
 fontSettings.setFontsSources(new FontSourceBase[]{liberationSans, emojisFont});
 	
  fontSettings.getSubstitutionSettings().getFontConfigSubstitution().setEnabled(false);
 fontSettings.getSubstitutionSettings().getFontNameSubstitution().setEnabled(false);
 fontSettings.getSubstitutionSettings().getFontInfoSubstitution().setEnabled(false);
 fontSettings.getSubstitutionSettings().getTableSubstitution().addSubstitutes("Segoe UI Emoji", "Noto Color Emoji");
  
  Document rootDocument = new Document();
  rootDocument.setFontSettings(fontSettings);
  rootDocument.setWarningCallback(new IWarningCallback() {
     @Override
     public void warning(WarningInfo warningInfo) {
         if (warningInfo.getWarningType() == WarningType.FONT_SUBSTITUTION) {
             LOG.warn("Font Warning: " + warningInfo.getDescription());
         }
     }
 });
  ...
 Document documentToAppend = new Document(inputStream, new TextLoadOptions());
 rootDocument.appendDocument(documentToAppend, ImportFormatMode.KEEP_SOURCE_FORMATTING);
  ...
 rootDocument.save(outputStream, new PdfSaveOptions());

The text that we are appending to our document is

\uD83D\uDE42 \uD83D\uDE09 \uD83D\uDE01 \uD83D\uDE0D \uD83D\uDE0E \uD83D\uDE0F \uD83D\uDC4F \uD83D\uDC4C \uD83D\uDC4B \uD83D\uDC4D \uD83D\uDC4E

However, in the PDF, the font glyphs are not rendering.

If we repeat the test using Noto (Monochrome) Emojis available on https://fonts.google.com/selection, the font glyphs render correctly.

The two PDFs are attached.

Could you please help.

Thanks
response_color.pdf (8.0 KB)

response_monochrome.pdf (9.1 KB)

@gs01

It seems that you are experiencing issues with rendering Noto Color Emoji glyphs in the PDF generated by Aspose.Words. This is a known limitation, as the Aspose.Words library currently does not support rendering colored emoji glyphs properly.

In a similar case, it was noted that when using the ‘Segoe UI Emoji’ font, the emojis rendered correctly, while the Noto Color Emoji did not. This indicates that the library may have specific support for certain emoji fonts, and unfortunately, the colored version of Noto Emoji is not among them at this time.

The issue has been logged in the Aspose issue tracking system, but as of now, there has been no update on when this feature will be implemented. If you need to use emojis in your PDF, you might consider using a different font that is known to work, such as ‘Segoe UI Emoji’, or the monochrome version of Noto Emoji, which you mentioned renders correctly.

If you have further questions or need assistance with other features of Aspose.Words, feel free to ask!

@gs01
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-22379

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.