Emoji Rendering and Detection in Word, PowerPoint, and Excel to PDF on Linux Lambda

We are converting Word, PowerPoint, and Excel documents to PDF using Aspose on a Linux-based AWS Lambda environment.

We are currently testing with:

Aspose.Words 26.9
Aspose.Slides 26.9
Aspose.Cells 26.9

We are investigating whether Aspose provides a supported and maintainable approach for correctly rendering emojis across these document formats without implementing custom emoji detection and image replacement logic.

1. Aspose.Words

We tested Aspose.Words with HarfBuzz text shaping enabled:

document.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;

Emoji shaping is improved, including several combined emoji sequences. However, emojis in the generated PDF are rendered in black and white rather than in color.

We understand that the color information for fonts such as Segoe UI Emoji is stored in the font’s color tables and that Aspose.Words previously did not support rendering these color font tables.

Could you please confirm whether this limitation still applies in Aspose.Words 26.9?

If so, is there currently any supported alternative for preserving color emojis when converting DOC/DOCX/rtf/odt to PDF on Linux, for example through external font loading, font substitution/fallback, or another rendering option?

2. Aspose.Slides

For Aspose.Slides, we tested FontsLoader.LoadExternalFont() using:

/usr/share/fonts/…/seguiemj.ttf

We also configured FontFallBackRulesCollection to use Segoe UI Emoji for the relevant emoji Unicode ranges.

This significantly improved the rendering of individual/color emojis.

However, combined emoji sequences are still not rendered correctly, including:

ZWJ emoji sequences
Keycap sequences
Other multi code point and composed emojis

These are rendered as separate components rather than as a single composed emoji.

Is there any additional font configuration, text shaping option, or other Aspose.Slides supported mechanism required to correctly render these combined emoji sequences when exporting PPT/PPTX/odp to PDF on Linux?

3. Aspose.Cells

We also tested Excel documents using Aspose.Cells 26.9 without any custom emoji replacement.

The generated PDF contains black-and-white emojis, and many emoji sequences have rendering and composition issues.

Is there a recommended external font loading, font fallback, text shaping, or color font configuration for Aspose.Cells that can improve emoji rendering during XLS/XLSX/ods to PDF conversion on Linux?

4. Emoji Detection API

Do Aspose.Words, Aspose.Slides, or Aspose.Cells provide a built-in or supported API for determining whether a document contains emojis?

Ideally, we would like to detect emojis without maintaining our own Unicode emoji-sequence parser.

If there is no document-level API, is there an Aspose supported mechanism for identifying emoji characters, glyphs, text runs, or portions while traversing document content?

In particular, we need detection to correctly distinguish complete emoji sequences from ordinary characters that can participate in emoji sequences, such as digits, #, and * in keycap emojis.

@tishr,
Thank you for the detailed information.

Regarding Aspose.Slides 26.9, Aspose.Slides provides mechanisms for loading external fonts and configuring font fallback during presentation rendering.

You can find the relevant documentation and API references here:

Based on the information provided, we cannot confirm whether the current font loading and fallback configuration is sufficient for your particular presentation and Linux environment.

For the issue with combined emoji sequences, such as ZWJ sequences and keycap sequences, Aspose.Slides does not expose a separate public text-shaping configuration that can be enabled specifically for composing multi-code-point emoji sequences. Font fallback is intended to select an appropriate font when the primary font does not contain a required glyph; it does not provide a separate setting for controlling the composition of such sequences.

To investigate the rendering behavior you are seeing, could you please provide:

  • a minimal PPT/PPTX/ODP file containing the affected emoji sequences;
  • the code used to load the external font and configure the fallback rules;
  • the seguiemj.ttf font file you are using;
  • the generated PDF;
  • and, if possible, an example showing the expected rendering.

This will allow us to reproduce the issue and determine whether this behavior represents a limitation or an issue that requires further investigation.

Regarding emoji detection, Aspose.Slides does not currently provide a dedicated public API for determining whether a presentation contains emojis or for identifying complete Unicode emoji sequences.

Presentation text can be accessed and inspected through text portions. The Text property of a portion returns its plain text:

However, a portion represents a text run in a paragraph and does not represent a Unicode grapheme or emoji-sequence boundary.

Therefore, traversing portions alone cannot reliably determine whether characters such as digits, #, or * are ordinary text or are part of a complete sequence such as a keycap emoji. If complete emoji-sequence detection is required, the extracted text would need to be analyzed separately according to the relevant Unicode emoji rules.

As for the questions related to Aspose.Words and Aspose.Cells , my colleagues from the corresponding product teams will review them and provide their responses soon.

@tishr Unfortunately rendering of colored Emoji glyphs is still not supported by Aspose.Words. This feature request is logged as WORDSNET-22379. We will keep you updated and let you know once the feature is supported.

Thank you. Kindly let me know.

1 Like