public static void runWithoutRenderingHints( Graphics g, Object[] oldRenderingHints, Runnable runnable ) {
		if( oldRenderingHints == null ) {
			runnable.run();
			return;
		}

		Graphics2D g2 = (Graphics2D) g;
		Object[] oldRenderingHints2 = {
			g2.getRenderingHint( RenderingHints.KEY_ANTIALIASING ),
			g2.getRenderingHint( RenderingHints.KEY_STROKE_CONTROL ),
		};

		resetRenderingHints( g2, oldRenderingHints );
		runnable.run();
		resetRenderingHints( g2, oldRenderingHints2 );
	}
Temporary resets rendering hints set with {@link #setRenderingHints}
and runs the given runnable.
<p>
This is intended for painting text while rendering hints are set.
<p>
If text antialiasing is disabled (in OS system settings or via
{@code -Dawt.useSystemAAFontSettings=off}), but general antialiasing is enabled,
then text is still painted using some kind of "grayscale" antialiasing,
which may make the text look bold (depends on font and font size).
To avoid this, temporary disable general antialiasing.
This does not affect text rendering if text antialiasing is enabled (usually the default).
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java