*/
public void addCharMetrics(AFMCharMetrics metrics) {
String name = metrics.getCharName();
- if (metrics.getUnicodeSequence() == null) {
+ if (metrics.getUnicodeSequence() == null && name.equals(".notdef")) {
//Ignore as no Unicode assignment is possible
return;
}
List<AFMCharMetrics> chars = afm.getCharMetrics();
for (AFMCharMetrics charMetrics : chars) {
if (charMetrics.getCharCode() >= 0) {
- String u = charMetrics.getUnicodeSequence();
- if (u != null && u.length() == 1) {
- mappingCount++;
- }
+ mappingCount++;
}
}
// ...and now build the table.
String unicodes = charMetrics.getUnicodeSequence();
if (unicodes == null) {
log.info("No Unicode mapping for glyph: " + charMetrics);
+ table[idx] = charMetrics.getCharCode();
+ idx++;
+ table[idx] = charMetrics.getCharCode();
+ idx++;
} else if (unicodes.length() == 1) {
table[idx] = charMetrics.getCharCode();
idx++;