public static FontMetrics getFontMetrics(Font font) {
		BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB_PRE);
		Graphics g = image.getGraphics();
		FontMetrics fm = g.getFontMetrics(font);
		g.dispose();
		return fm;
	}
Returns a font metrics for the given font using a generic buffered image graphics context.

@param font the font
@return the font metrics
Ghidra/Framework/Generic/src/main/java/generic/test/AbstractGenericTest.java