final FontUse[] fontUses = getFontConsumer().getUsedFontUses();
/* Embed fonts. */
for (int i = 0; i < fontUses.length; i++) {
final FontUse fontUse = fontUses[i];
final FontPs fontPS = (FontPs) fontUse.getFontOutput(
"application/ps");
/* For now, we don't know how to process TrueType fonts. */
if (! (fontUses[i].getEncoding() instanceof EncodingVector)) {
continue;
}
final Font font = fontUse.getFont();
if (! font.isEmbeddable()) {
continue;
}
final String fontContents = new String(
fontPS.getContentsPostScriptHex());
write(fontContents);
}
this.fontProcSet = getApplicationNameShort()
+ "Fonts";