}
}
}
else
{
Font font = null;
String err = null;
try
{
font = Font.create(file.toString());
}
catch(Exception e)
{
err = e.toString();
}
if (font == null || font.getOS2Table() == null || font.getNameTable() == null)
{
System.err.println("Error reading " + file + ": " + err);
}
else
{
Os2Table os2Table = font.getOS2Table();
int fsType = os2Table.getLicenseType();
NameTable name = font.getNameTable();
String copyright = name.getRecord(Table.nameCopyrightNotice);
String trademark = name.getRecord(Table.nameTrademark);
String postScriptName = name.getRecord(Table.namePostscriptName);
LocalFont localFont = new LocalFont(postScriptName, path, fsType, copyright, trademark);