The old way getting FontMetrics causes problems on linux systems with java 8