Issue with font fallback for telugu langauge

Hi!
I have a problem with Telugu language. Nor font substitution nor font fallback seems to be not working.
I am trying to create a document with text in this language and always get “Times New Roman” font and missing symbols. There is also no warnings in warnings callback.
I use Aspose.Words version 19.4.0 on Windows 10. The font “Nirmala UI” is installed on my system.
I`m trying to create document by this code:

	public class HandleDocumentWarnings : IWarningCallback
	{
		public void Warning(WarningInfo info)
		{
			if (info.WarningType == WarningType.FontSubstitution)
			{
				Console.WriteLine("Font substitution: " + info.Description);
			}
		}
	}

	public void TestFonts()
	{
		var defaultInstance = FontSettings.DefaultInstance;

		defaultInstance.FallbackSettings.BuildAutomatic();
		defaultInstance.FallbackSettings.Save(@"c:\temp\fallback.xml");

		defaultInstance.SubstitutionSettings.DefaultFontSubstitution.Enabled = true;
		defaultInstance.SubstitutionSettings.DefaultFontSubstitution.DefaultFontName = "Nirmala UI";
		defaultInstance.SubstitutionSettings.TableSubstitution.AddSubstitutes("Times New Roman", "Nirmala UI");

		var builder = new DocumentBuilder();
		builder.Document.WarningCallback = new HandleDocumentWarnings();

		builder.Write("తెలుగు");
		builder.Document.Save(@"c:\temp\telugu.docx", SaveFormat.Docx);
	}

I attached fallback.xml and telugu.docx files in zip-archive.

teluguProblem.zip (6.7 KB)

@Dmitry_Emets

You are saving document to DOCX. You do not need to use FontSettings class. Please use the following code snippet to get the desired output.

var builder = new DocumentBuilder();
builder.Font.Name = "Nirmala UI";
builder.Write("తెలుగు");

Thank you for response!
But my code snippet is just a reproduction of the problem. Documents can be multilingual and I really need a solution like fonts fallback or substitution. Fonts substituition works properly for Korean for example, if i substitue Arial Unicode MS with Noto fonts. But i can’t substitute any font or tune fallback to work with Telugu. According to documentation fonts fallback should work directly for such use cases. Please, help me understand what i`m doin wrong.

@Dmitry_Emets

If you are rending document to fixed file formats e.g. PDF, XPS, JPEG etc., you can use font substitution and font fallback. For flow formats e.g. DOCX, DOC, you do not need to use it.

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output file that shows the undesired behavior.
  • Please attach the expected output file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.