}
}
public static Font getOrCreateFont(Book book, short boldWeight, Color color, short fontHeight, java.lang.String name,
boolean italic, boolean strikeout, short typeOffset, byte underline) {
Font font = book.findFont(boldWeight, color, fontHeight, name, italic, strikeout, typeOffset, underline);
if (font == null) {
font = book.createFont();
font.setBoldweight(boldWeight);
BookHelper.setFontColor(book, font, color);
font.setFontHeight(fontHeight);
font.setFontName(name);
font.setItalic(italic);
font.setStrikeout(strikeout);
font.setTypeOffset(typeOffset);
font.setUnderline(underline);
}
return font;
}