Missing unicode characters in PDF output

I am following the instructions for defining fallback fonts for missing characters, e.g. special characters not available in the main font used for the document. Select characters are still missing, even though they should be provided by a fallback font.

For example, 田 is avaible in Noto Sans CJK JP (and other Noto Sans CJK fonts). Incidentally, this is a .ttc font, while most of the other fonts are regular .ttf files.

Additionally, the non-rendered characters are replaced by an unrelated character. In the attached example, copying the non-rendered 田 results in a 珍.

Minimal code example used to generate the attached files:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
FontSettings fontSettings = FontSettings.getDefaultInstance()
fontSettings.setFontsSources(new FontSourceBase[] { new SystemFontSource() });
fontSettings.getFallbackSettings().loadNotoFallbackSettings();

builder.write(
  "Non-working, available from Noto Sans CJK: 田 \n" +
  "Other non-working: 眯 眠 眙 眉 省 盶 盱 盘 盐 盏 皮 皇 的 百 白 登 癩 癥 瘠 疣 畴 畳 畲 畱 異 畯 畭 畬 番 畧 畦 略 畤 畣 畢 畡 畔 畑 畅 男 甲 田 用 産 甠 生 甜 甘 甄 瓷 瓦 瓣 瓜 瑸 瑵 瑴 瑳 瑲 瑰 瑯 瑮 瑩 瑥 瑣 瑡 瑞 瑙 瑓 琯 琠 琛 珍\n" +
  "Working: \uD808\uDC2D \uFDF5 \uD83D\uDC31 \n"
);

doc.save("/tmp/unicodeExample.docx");
doc.save("/tmp/unicodeExample.pdf", SaveFormat.PDF);

unicodeExample.pdf (32.0 KB)
unicodeExample.docx (7.5 KB)

@petteraas The problem might occur because the font names in the package “fonts-noto-cjk” (“Noto Sans CJK JP”) is different then the ones used in fallback settings (“Noto Sans CJK JP Regular”). It seems that these fonts names have been changed since the fallback setting were updated last time. Please change the name in fallback settings to “Noto Sans CJK JP” (or you could use other Noto CJK font if your prefer). It should fix the issue.
Please let us know if this help you to fix the problem.
We already updated noto fallback settings in the current code base (issue WORDSNET-24620) and the next version of Aspose.Words will include it’s updated version.

The issues you have found earlier (filed as WORDSNET-24620) have been fixed in this Aspose.Words for .NET 22.12 update also available on NuGet.