if (base14 != null) {
try {
Class<? extends Typeface> clazz = Class.forName(
"org.apache.fop.fonts.base14." + base14).asSubclass(Typeface.class);
try {
Typeface tf = clazz.newInstance();
font.addCharacterSet(sizeMpt,
CharacterSetBuilder.getSingleByteInstance()
.build(characterset, codepage, encoding, tf,
eventProducer));
} catch (Exception ie) {
String msg = "The base 14 font class " + clazz.getName()
+ " could not be instantiated";
log.error(msg);
}
} catch (ClassNotFoundException cnfe) {
String msg = "The base 14 font class for " + characterset
+ " could not be found";
log.error(msg);
}
} else {
font.addCharacterSet(sizeMpt, CharacterSetBuilder.getSingleByteInstance()
.buildSBCS(characterset, codepage, encoding, accessor, eventProducer));
}
}
return font;
} else if ("outline".equalsIgnoreCase(type)) {
String characterset = afpFontCfg.getAttribute("characterset");
if (characterset == null) {
eventProducer.fontConfigMissing(this, "characterset attribute",
afpFontCfg.getLocation());
return null;
}
String name = afpFontCfg.getAttribute("name", characterset);
CharacterSet characterSet = null;
String base14 = afpFontCfg.getAttribute("base14-font", null);
if (base14 != null) {
try {
Class<? extends Typeface> clazz = Class.forName("org.apache.fop.fonts.base14."
+ base14).asSubclass(Typeface.class);
try {
Typeface tf = clazz.newInstance();
characterSet = CharacterSetBuilder.getSingleByteInstance()
.build(characterset, codepage, encoding, tf, eventProducer);
} catch (Exception ie) {
String msg = "The base 14 font class " + clazz.getName()
+ " could not be instantiated";