*/
public static PDFont createFont( COSDictionary dic ) throws IOException
{
PDFont retval = null;
COSName type = (COSName)dic.getDictionaryObject( COSName.TYPE );
if( !type.equals( COSName.FONT ) )
{
throw new IOException( "Cannot create font if /Type is not /Font. Actual=" +type );
}
COSName subType = (COSName)dic.getDictionaryObject( COSName.SUBTYPE );
if( subType.equals( COSName.getPDFName( "Type1" ) ) )
{
retval = new PDType1Font( dic );
}
else if( subType.equals( COSName.getPDFName( "MMType1" ) ) )
{
retval = new PDMMType1Font( dic );
}
else if( subType.equals( COSName.getPDFName( "TrueType" ) ) )
{
retval = new PDTrueTypeFont( dic );
}
else if( subType.equals( COSName.getPDFName( "Type3" ) ) )
{
retval = new PDType3Font( dic );
}
else if( subType.equals( COSName.getPDFName( "Type0" ) ) )
{
retval = new PDType0Font( dic );
}
else
{