List of usage examples for com.itextpdf.text.pdf BaseFont createFont
public static BaseFont createFont(String name, String encoding, boolean embedded, boolean cached, byte ttfAfm[], byte pfb[]) throws DocumentException, IOException
From source file:jdbreport.model.io.pdf.itext5.ReportFontMapper.java
License:Apache License
public BaseFont awtToPdf(String fontName) { try {//from w w w .java2s .c o m BaseFontParameters p = getBaseFontParameters(fontName); if (p != null) { return BaseFont.createFont(p.fontName, BaseFont.IDENTITY_H, p.embedded, p.cached, p.ttfAfm, p.pfb); } } catch (DocumentException | IOException e) { throw new ExceptionConverter(e); } return null; }