In iText7, is it possible to create a PdfFont from a classpath font resource*?
Currently, I save the resource to a temporary folder and use
PdfFont font;
public void setFont() {
font = PdfFontFactory.createFont(FontProvider.getFont(), PdfEncodings.IDENTITY_H, true);
}
Where FontProvider.getFont() either returns a path to the classpath file for use in the IDE or saves a file to a temporary folder on the host system and returns a path to this.
If possible, I'd like to avoid the step of saving the file to the host system.
(* an open licensed font)