{
ArgumentNullException.validate("registry", registry);
ArgumentNullException.validate("encoding", encoding);
this.lookupKey = new EncodingFontKey();
this.knownMetrics = new FirstLevelFontCache(registry.getSecondLevelCache());
this.registry = registry;
this.defaultEncoding = encoding;
this.metricsFactory = (ITextFontMetricsFactory) registry.createMetricsFactory();
}