num++;
Vector triplets = configFontInfo.getFontTriplets();
for (Enumeration t = triplets.elements();
t.hasMoreElements(); ) {
FontTriplet triplet = (FontTriplet)t.nextElement();
boolean embed = configFontInfo.getEmbedFile() != null;
// if embed font is not specified, use system "Dialog"
// logical font name for each Locale.
String family = embed ? triplet.getName() : "Dialog";
metric = new FontMetricsMapper(family,
getFontMetrics(triplet),
graphics);
if (embed)
metric.setEmbedFont(configFontInfo.getEmbedFile());
fontInfo.addMetrics(internalName, metric);
fontInfo.addFontProperties(internalName,
triplet.getName(),
triplet.getStyle(),
triplet.getWeight());
}
}
} catch (Exception ex) {
MessageHandler.error("Failed to read font metrics file "
+ configFontInfo.getMetricsFile()