All kinds of fonts : Font « PDF « Java Tutorial

import java.awt.Color;

import com.lowagie.text.Document;
import com.lowagie.text.Font;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;

public class MainClass {
  public static void main(String[] args) throws Exception {
    Document document = new Document();
    PdfWriter.getInstance(document, new FileOutputStream("2.pdf"));;

    Font[] fonts = new Font[14];
    fonts[0] = new Font(Font.COURIER, Font.DEFAULTSIZE, Font.NORMAL);
    fonts[1] = new Font(Font.COURIER, Font.DEFAULTSIZE, Font.ITALIC);
    fonts[2] = new Font(Font.COURIER, Font.DEFAULTSIZE, Font.BOLD);
    fonts[3] = new Font(Font.COURIER, Font.DEFAULTSIZE, Font.BOLD | Font.ITALIC);
    fonts[4] = new Font(Font.HELVETICA, Font.DEFAULTSIZE, Font.NORMAL);
    fonts[5] = new Font(Font.HELVETICA, Font.DEFAULTSIZE, Font.ITALIC);
    fonts[6] = new Font(Font.HELVETICA, Font.DEFAULTSIZE, Font.BOLD);
    fonts[7] = new Font(Font.HELVETICA, Font.DEFAULTSIZE, Font.BOLDITALIC);
    fonts[8] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.NORMAL);
    fonts[9] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.ITALIC);
    fonts[10] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.BOLD);
    fonts[11] = new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.BOLDITALIC);
    fonts[12] = new Font(Font.SYMBOL, Font.DEFAULTSIZE);
    fonts[13] = new Font(Font.ZAPFDINGBATS, Font.DEFAULTSIZE, Font.UNDEFINED, new Color(0xFF, 0x00,
    // add the content
    for (int i = 0; i < 14; i++) {
      document.add(new Paragraph("quick brown fox jumps over the lazy dog", fonts[i]));


29.13.1.Create font Font(Font.COURIER, 10, Font.BOLD)
29.13.4.Create font from pfm file
29.13.5.Embeded font
29.13.6..afm font
29.13.7.TrueType font
29.13.8..otf font
29.13.9.Font Metrics
29.13.10.Embeded TrueType Font
29.13.11.All kinds of fonts
29.13.12.Get font name
29.13.13.Not Embedded font
29.13.14.Font supporting Unicode
29.13.15.Japanese font
29.13.16.Korea font
29.13.17.Right To Left Example
29.13.18.BaseFont.createFont(BaseFont.HELVETICA,BaseFont.WINANSI, BaseFont.NOT_EMBEDDED)
29.13.19.Use truetype font to draw unicode string
29.13.20.Use DefaultFontMapper