PSResource fontRes = new PSResource(PSResource.TYPE_FONT, tf.getFontName());
fontResources.put(key, fontRes);
embedFont(gen, tf, fontRes);
if (tf instanceof SingleByteFont) {
SingleByteFont sbf = (SingleByteFont)tf;
if (encodeAllCharacters) {
sbf.encodeAllUnencodedCharacters();
}
for (int i = 0, c = sbf.getAdditionalEncodingCount(); i < c; i++) {
SingleByteEncoding encoding = sbf.getAdditionalEncoding(i);
defineEncoding(gen, encoding);
String postFix = "_" + (i + 1);
PSResource derivedFontRes = defineDerivedFont(gen, tf.getFontName(),
tf.getFontName() + postFix, encoding.getName());
fontResources.put(key + postFix, derivedFontRes);