Font substitute and open type font

Hi Support,

I’m trying to replace font by another when app convert a random PDF to PDF A1. For this, I’m using this code :

FontSource fs = new com.aspose.pdf.FolderFontSource(“location of font”);
com.aspose.pdf.FontRepository.getSources().add(fs);
FontRepository.getSubstitutions().add(new SimpleFontSubstitution(“Helvetica”, “TeXGyreHeros”));


But font TeXGyreHeros is an open type font.

I’ve seen your documentation and the only way found to used OTF font is FontRepository.openFont(fontStream, FontTypes.OTF);

Do you know another way for Aspose PDF to load font without specify font types ? Like on Aspose Words.


Regards,

Florian




A solution is to transform OTF file in TTF file (some website does it)

Hi Florian,


Thanks for your inquriy. We have logged a ticket PDFJAVA-36217 in our issue tracking system for further investigation and rectification. We will keep you updated about the issue resolution progress.

We are sorry for the inconvenience.

Best Regards,

The issues you have found earlier (filed as PDFJAVA-36217) have been fixed in Aspose.Pdf for Java 16.11.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.