I've created a table using Java and iTextPdf that lays out a bunch of cells. I can't quite figure out how to change the font for the text inside of these cells. It's something for my kids, so I'm trying to use Comic Sans MS. Everything compiles and runs just fine, but I get a generic font (probably Helvetica or something like it).
Anyone know how to generate a font like this? Thanks!
Here is the scaled down version of what I wrote:
import com.itextpdf.text.FontFactory;
import com.itextpdf.text.pdf.FontSelector;
public static PdfPTable createTable() {
FontSelector selector = new FontSelector();
selector.addFont(FontFactory.getFont("Comic Sans MS"));
PdfPTable table = new PdfPTable(3);
PdfPCell cell;
Phrase ph;
ph = selector.process("My Title");
cell = new PdfPCell(ph);
table.addCell(cell);
return table;