@Test
	public void testEditOptionFont() throws Exception {
		env.showTool();
		addViews();

		runSwing(() -> {
			ByteViewerComponent c = panel.getCurrentComponent();
			FieldLocation loc = getFieldLocation(getAddr(0x01001000));
			c.setCursorPosition(loc.getIndex(), loc.getFieldNum(), 0, 0);
		});

		Options opt = tool.getOptions("ByteViewer");
		// change the Font
		Font font = new Font("Times New Roman", Font.BOLD, 12);
		putFont(opt, ByteViewerComponentProvider.OPTION_FONT, font);

		FieldLocation loc = getFieldLocation(getAddr(0x01001000));
		ByteViewerComponent c = panel.getCurrentComponent();
		ByteField field = c.getField(loc.getIndex(), loc.getFieldNum());
		assertEquals(font, field.getFontMetrics().getFont());
	}
Test editing in the Byte Viewer.
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin2Test.java