// we create a writer that listens to the document
PdfWriter.getInstance(document,
new GfrFileOutputStream("com.lowagie.examples.fonts.styles.FontStylePropagation.pdf"));
// step 3: we open the document
document.open();
// step 4:
LwgPhrase myPhrase = new LwgPhrase("Hello 1! ", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.BOLD));
myPhrase.add(new LwgPhrase("some other font ", new LwgFont(LwgFont.HELVETICA, 8)));
myPhrase.add(new LwgPhrase("This is the end of the sentence.\n", new LwgFont(LwgFont.TIMES_ROMAN, 8, LwgFont.ITALIC)));
document.add(myPhrase);