try
{
final BaseFont baseFont = BaseFont.createFont
(fontType, encoding, embedded, false, ttfAfm, pfb);
return new CompoundResource(key, dc, baseFont, getFactoryType());
}
catch (Exception e)
{
throw new ResourceCreationException
("Failed to create the font " + fontType, e);