private FontMetrics getMetrics(int style) {
		Integer i = style;
		FontMetrics fm = metricsMap.get(i);
		if (fm == null) {
			if (style == -1) {
				fm = getFontMetrics(baseFont);
				metricsMap.put(i, fm);
			}
			else {
				Font font = new Font(baseFont.getName(), style, baseFont.getSize());
				fm = getFontMetrics(font);
				metricsMap.put(i, fm);
			}
		}
		return fm;
	}
updates the style of the field at the selected index.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/options/OptionsGui.java