private MetricsFile getMetricsFile() throws IOException, FontException {
MetricsFile metricsFile = null;
final URL serializedMetricsFile = this.getRegisteredFont()
.getSerializedMetricsFile();
if (serializedMetricsFile == null) {
final MetricsFileReader reader = this.getRegisteredFont()
.getMetricsFileReader();
metricsFile = reader.metricsFileFactory();
if (metricsFile == null) {
throw new FontException("Unknown Metric Format: "
+ reader.getDescription());
}
if (metricsFile.getInternalEncoding() == null) {
throw new FontException("Unusable Internal Encoding: "
+ reader.getDescription());
}
return metricsFile;
} else {
try {
metricsFile = deserializeMetricsFile();