final AttributeList attrList = new AttributeList();
attrList.setAttribute(null, "bold", String.valueOf(bold));
attrList.setAttribute(null, "italics", String.valueOf(italics));
if (record instanceof CompoundFontRecord)
{
final CompoundFontRecord cfr = (CompoundFontRecord) record;
record = cfr.getBase();
}
if (record instanceof TrueTypeFontRecord)
{
final TrueTypeFontRecord trueTypeFontRecord = (TrueTypeFontRecord) record;
attrList.setAttribute(null, "source", String.valueOf(trueTypeFontRecord.getFontSource()));