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