font=new Font(baseFont); }else{ font=FontFactory.getFont(fontName);
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @param encoding the encoding of the font * @param size the size of this font * @param style the style of this font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname, final String encoding, final float size, final int style) { return getFont(fontname, encoding, defaultEmbedding, size, style, null); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @param encoding the encoding of the font * @param embedded true if the font is to be embedded in the PDF * @param size the size of this font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname, final String encoding, final boolean embedded, final float size) { return getFont(fontname, encoding, embedded, size, Font.UNDEFINED, null); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @param encoding the encoding of the font * @param size the size of this font * @param style the style of this font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname, final String encoding, final float size, final int style) { return getFont(fontname, encoding, defaultEmbedding, size, style, null); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @param encoding the encoding of the font * @param size the size of this font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname, final String encoding, final float size) { return getFont(fontname, encoding, defaultEmbedding, size, Font.UNDEFINED, null); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @param size the size of this font * @param color the <CODE>BaseColor</CODE> of this font. * @return the Font constructed based on the parameters * @since 2.1.0 */ public static Font getFont(final String fontname, final float size, final BaseColor color) { return getFont(fontname, defaultEncoding, defaultEmbedding, size, Font.UNDEFINED, color); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname) { return getFont(fontname, defaultEncoding, defaultEmbedding, Font.UNDEFINED, Font.UNDEFINED, null); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @param size the size of this font * @param style the style of this font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname, final float size, final int style) { return getFont(fontname, defaultEncoding, defaultEmbedding, size, style, null); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname) { return getFont(fontname, defaultEncoding, defaultEmbedding, Font.UNDEFINED, Font.UNDEFINED, null); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @param encoding the encoding of the font * @param size the size of this font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname, final String encoding, final float size) { return getFont(fontname, encoding, defaultEmbedding, size, Font.UNDEFINED, null); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @param encoding the encoding of the font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname, final String encoding) { return getFont(fontname, encoding, defaultEmbedding, Font.UNDEFINED, Font.UNDEFINED, null); }
/** * Constructs a <CODE>Font</CODE>-object. * * @param fontname the name of the font * @param size the size of this font * @return the Font constructed based on the parameters */ public static Font getFont(final String fontname, final float size) { return getFont(fontname, defaultEncoding, defaultEmbedding, size, Font.UNDEFINED, null); }
/** * Obtain the font used to render text in the table; Meant to be overriden if a different font is desired. * @return The font used to render text in the table. */ protected Font getTableFont() { return FontFactory.getFont(FontFactory.HELVETICA, 10, Font.NORMAL, new BaseColor(0x00, 0x00, 0x00)); }
/** * change the font to SYMBOL */ protected void setGreekFont() { float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.SYMBOL, fontsize, Font.NORMAL)); }
/** * Sets the dingbat's color. * * @param zapfDingbatColor color for the ZapfDingbat */ public void setDingbatColor(BaseColor zapfDingbatColor) { float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL, zapfDingbatColor)); }
/** * Sets the dingbat's color. * * @param zapfDingbatColor color for the ZapfDingbat */ public void setDingbatColor(BaseColor zapfDingbatColor) { float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL, zapfDingbatColor)); }
/** * Creates a ZapfDingbatsList * * @param zn a char-number * @param symbolIndent indent */ public ZapfDingbatsList(int zn, int symbolIndent) { super(true, symbolIndent); this.zn = zn; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * Creates a ZapfDingbatsList * * @param zn a char-number */ public ZapfDingbatsList(int zn) { super(true); this.zn = zn; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * Creates a ZapdDingbatsNumberList * @param type the type of list */ public ZapfDingbatsNumberList(int type) { super(true); this.type = type; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * Makes chunk content bold. * @param chunk The chunk whose content is to be rendered bold. * @param color The font color desired. */ private void setBoldStyle(Chunk chunk, BaseColor color) { Font font = chunk.getFont(); chunk.setFont(FontFactory.getFont(font.getFamilyname(), font.getSize(), Font.BOLD, color)); }