List of usage examples for com.lowagie.text FontFactory getFont
public static Font getFont(String fontname, String encoding, boolean embedded, float size, int style, Color color)
Font
-object. From source file:org.pz.platypus.plugin.pdf.PdfFontFactory.java
License:Open Source License
/** * Opens a font using the IDENTITY-H encoding. * * @param fontName the name assigned to the font in the font list * @param size the size in points/*from w ww. jav a 2s .c o m*/ * @param style bold, italic, etc. * @param color font color (RGB 0-255) * @return the Font if opened; null if the file could not be opened or an error occurred. */ Font getIdentityHFont(final String fontName, float size, int style, Color color) { Font font; try { font = FontFactory.getFont(fontName, BaseFont.IDENTITY_H, BaseFont.EMBEDDED, size, style, color); } catch (Exception ex) { font = null; } return (font); }