}
final String familyName = table.getPrimaryName(NameTable.NAME_FAMILY);
final String[] allNames = table.getAllNames(NameTable.NAME_FAMILY);
final DefaultFontFamily fontFamily = createFamily(familyName);
alternateFamilyNames.put(familyName, fontFamily);
for (int i = 0; i < allNames.length; i++)
{
final String name = allNames[i];
fontFamily.addName(name);
alternateFamilyNames.put(name, fontFamily);
}
final String[] allFullNames = table.getAllNames(NameTable.NAME_FULLNAME);
for (int i = 0; i < allFullNames.length; i++)
{
final String name = allFullNames[i];
this.fullFontNames.put(name, fontFamily);
}
try
{
final TrueTypeFontRecord record = new TrueTypeFontRecord(font, fontFamily);
fontFamily.addFontRecord(record);
}
catch (FontException e)
{
Log.info("The font '" + font.getFilename() + "' is invalid.");
}