We are using java aspose and running aspose in Windows 10:
I have installed a new font on Windows 10.
Then I’ve created a word document which uses that font.
When saving as pdf with Aspose the font is ignored.
If I add the font file to the document settings font sources, then it works fine.
I don’t know why the font is available in Word but not in aspose?
Here is my code:
String docname="C:\\barcode.docx";
Document doc = new Document(docname);
// Create a font settings object for our document
doc.setFontSettings(new FontSettings());
SystemFontSource systemFontSource = (SystemFontSource)
doc.getFontSettings().getFontsSources()[0];
// Create a font source from a file in our system
FileFontSource fileFontSource = new FileFontSource("C:\\usps4cb.ttf", 0);
// Import the font source into our document
//doc.getFontSettings().setFontsSources(new FontSourceBase[]{systemFontSource, fileFontSource});
doc.save("C:\\barcode.pdf");