@tahir.manzoor I think you misunderstood my post, for korean-only.docx, the font ‘UnDotum’ does exist in the system font’s folder, but ‘AR PL UKai CN’ is still used for rendering.
Running:
Document doc = new Document(filename);
doc.setWarningCallback( new WarningCallback() );
FontSettings fontSettings = new FontSettings();
fontSettings.getFallbackSettings().buildAutomatic();
fontSettings.getFallbackSettings().save("fallback.xml");
doc.setFontSettings(fontSettings);
PdfSaveOptions options = new PdfSaveOptions();
doc.save(outputFilename, options);
This produces the following output:
$ java -jar build/libs/AsposeTest-1.0-all.jar korean-only.docx encoding.pdf
Font sub: Font substitutes: 'Calibri' replaced with 'Liberation Sans'.
Font sub: Font 'Gulim' has not been found. Using 'AR PL UKai CN' font instead.
And produces the following PDF: https://forum.aspose.com/uploads/discourse_instance3/21357