Itext Nouvelle Police en Gras et souligné

Je suis en train d'ajouter une nouvelle police à mon pdf dont j'ai besoin pour le mettre en gras et souligné..

Je peux ajouter la nouvelle Police, mais ne peut pas le mettre en gras et souligné, dans le même temps.

J'ai essayé la manière suivante..

public class PdfGenerator {

    private static final String BASE_FONT = "Trebuchet MS";
    private static final String BASE_FONT_BOLDITALIC = "Trebuchet MS BI";
    private static final String BASE_FONT_BOLD = "Trebuchet MS B";

    private static final Font titlefontSmall = FontFactory.getFont(
            BASE_FONT_BOLD, 10, Font.UNDERLINE);

    static {
        String filePath = "..my font directory";
        String fontPath = filePath + "\\" + "trebuc.ttf";
        String fontPathB = filePath + "\\" + "TREBUCBD.TTF";
        String fontPathBI = filePath + "\\" + "TREBUCBI.TTF";

        FontFactory.register(fontPath, BASE_FONT);
        FontFactory.register(fontPathB, BASE_FONT_BOLD);
        FontFactory.register(fontPathBI, BASE_FONT_BOLDITALIC);
    }

    public void genMyPdf(String filePath) {
        try {
            Document document = new Document();
            PdfWriter writer = PdfWriter.getInstance(document,
                    new FileOutputStream(filePath));
            document.open();

            Paragraph p = new Paragraph("This should be bold & underline",
                    titlefontSmall);
            document.add(p);
            document.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (DocumentException e) {
            e.printStackTrace();
        }

    }

}

Ce que je fais mal ?

OriginalL'auteur Shrey | 2013-03-20