We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Fontes

Hello good afternoon.

I would like to know how to change the font in version 17.4.0 license WORDS to JAVA.

I would like to define a specific source, for example ("Arial", new String [] {"Times New Roman", "Calibri"});

Note that there was a method in previous versions "FontConfigs.setFontSubstitutes", which in the current version 17.4.0 no longer exists.

Could you help me?

Hi there,


Thanks for your inquiry. Please check following code snippet to set Font Substitution for the document. Hopefully it will help you to accomplish the task.

com.aspose.words.Document document = new
com.aspose.words.Document(“input.docx”);<o:p></o:p>

FontSettings FontSettings = new FontSettings();

FontSettings.setFontSubstitutes("Arial", new String[] { "Times New Roman","Calibri" });

// Set font settings

document.setFontSettings(FontSettings);

// Save output document

document.save("output.pdf");


Best Regards,