private void writeTriplets(TransformerHandler handler,
FontTriplet[] fontTriplets) throws SAXException {
AttributesImpl attrs = new AttributesImpl();
for (int i = 0; i < fontTriplets.length; i++) {
FontTriplet next = fontTriplets[i];
attrs.clear();
attrs.addAttribute("", "name", "name", "CDATA", next.getName());
attrs.addAttribute("", "style", "style", "CDATA", next.isItalic()
? "italic"
: "normal");
attrs.addAttribute("", "weight", "weight", "CDATA", next.isBold()
? "bold"
: "normal");
handler.startElement("", "font-triplet", "font-triplet", attrs);
handler.endElement("", "font-triplet", "font-triplet");
}