in src/java/org/apache/fop/render/pdf/pdfbox/FOPPDFSingleByteFont.java [277:306]
private boolean differentGlyphData(PDFont otherFont) throws IOException {
if (charStringsDict == null) {
charStringsDict = getCharStringsDict(font.font);
}
Map<String, byte[]> otherFontMap = getCharStringsDict(otherFont);
for (Map.Entry<String, byte[]> s : otherFontMap.entrySet()) {
if (charStringsDict.containsKey(s.getKey())) {
int numberDiff = 0;
byte[] b1 = charStringsDict.get(s.getKey());
byte[] b2 = s.getValue();
int b1Index = b1.length - 1;
int b2Index = b2.length - 1;
while (b1Index >= 0 && b2Index >= 0) {
if (b1[b1Index] != b2[b2Index]) {
numberDiff++;
if (numberDiff > 2) {
break;
}
}
b1Index--;
b2Index--;
}
if (numberDiff > 2) {
// log.info(getFontName() + " " + s.getKey() + " not equal " + numberdiff);
return true;
}
}
}
return false;
}