Returns FontMetrics object that keeps metrics of the specified font.
FontMetrics fm;
for (FontMetrics element : cacheFM) {
fm = element;
if (fm == null){
break;
}
if (fm.getFont().equals(font)){
return fm;
}
}
fm = new FontMetricsImpl(font);
System.arraycopy(cacheFM, 0, cacheFM, 1, cacheFM.length -1);
cacheFM[0] = fm;
return fm;