List of usage examples for com.itextpdf.text.pdf BaseField setFontSize
public void setFontSize(float fontSize)
From source file:com.vectorprint.report.itext.style.stylers.FieldFont.java
License:Open Source License
@Override public <E> E style(E element, Object data) throws VectorPrintException { element = super.style(element, data); BaseField bf = getFromCell(element); if (bf != null) { com.itextpdf.text.Font f = FontFactory.getFont(getValue(FAMILY_PARAM, String.class), getValue(SIZE_PARAM, Float.class), getValue(STYLE_PARAM, Font.STYLE.class).getStyle()); if (f.getBaseFont() == null) { throw new VectorPrintRuntimeException( "font " + f.getFamilyname() + " does not have a basefont, check your fontloading"); }/*from www .java 2 s . co m*/ bf.setFont(f.getBaseFont()); bf.setFontSize(getValue(SIZE_PARAM, Float.class)); bf.setTextColor(itextHelper.fromColor(getValue(COLOR_PARAM, Color.class))); } return element; }