nonBase14.setWidthMetrics(firstChar,
lastChar,
makeArray(metrics.getWidths()));
//Handle encoding
CodePointMapping mapping = singleByteFont.getCodePointMapping();
if (singleByteFont.isSymbolicFont()) {
//no encoding, use the font's encoding
} else if (PDFEncoding.isPredefinedEncoding(mapping.getName())) {
font.setEncoding(mapping.getName());
} else {
CodePointMapping winansi = CodePointMapping.getMapping(
CodePointMapping.WIN_ANSI_ENCODING);
PDFEncoding pdfEncoding = new PDFEncoding(winansi.getName());
PDFEncoding.DifferencesBuilder builder
= pdfEncoding.createDifferencesBuilder();
int start = -1;
String[] winansiNames = winansi.getCharNameMap();
String[] charNameMap = mapping.getCharNameMap();
for (int i = 0; i < 256; i++) {
String wac = winansiNames[i];
String c = charNameMap[i];
if (!wac.equals(c)) {