public FontMetrics getFontMetrics(final FontIdentifier record, final FontContext context)
{
final CompoundFontIdentifier cid = (CompoundFontIdentifier) record;
final FontRegistry registry = cid.getRegistry();
FontMetricsFactory metricsFactory = (FontMetricsFactory) metricsFactories.get(registry);
if (metricsFactory == null)
{
metricsFactory = registry.createMetricsFactory();
metricsFactories.put (registry, metricsFactory);
}
return metricsFactory.createMetrics(cid.getIdentifier(), context);
}