/**
* {@inheritDoc}
*/
public FontUse selectFontPanose(final byte[] panose, final int codePoint)
throws FontException {
final Panose desiredPanose = Panose.makeInstance(panose);
RegisteredFontDesc bestFit = null;
long bestDifference = Long.MAX_VALUE;
for (RegisteredFontFamily rff : this.server.registeredFontFamilies()) {
for (int i = 0; i < rff.getFontDescriptions().size(); i++) {
final RegisteredFontDesc rfd = rff.getFontDescriptions().get(i);
final Panose panoseInstance = rfd.getRegisteredFont()
.getPanose();
final long difference = panoseInstance.difference(desiredPanose, null);
if (difference < bestDifference) {
bestDifference = difference;
bestFit = rfd;
}
}