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

Free Support Forum - aspose.com

How Aspose-Pdf chose fonts to convert html to pdf

Now our testing fonts get from Windows or Mac laptop, but it may meet fonts copyright problem. An alternative solution is using open source fonts, but there are so many kinds of fonts installed in operating system, how Aspose pick which kind of font to use in convert ?


Aspose.PDF find Windows and PDF Standard fonts in the system to use while generating the PDF documents. Otherwise, it selects the most suitable font that supports the used language characters. For the fonts which has license limitations, you can use below property to prevent the warning or exception:


Furthermore, you can also use font substitution method to check which font was substituted:

document.FontSubstitution.add(new Document.FontSubstitutionHandler() {
            public void invoke(Font font, Font newFont) {
                System.out.println("WARNING: Font " + font.getFontName() + " was substituted with another font -> " + newFont