public static @NotNull Font deriveFont(@NotNull Font oldFont, @NotNull Map<? extends Attribute, ?> attributes) {
    Font newFont = oldFont.deriveFont(attributes);
    return oldFont instanceof UIResource ? new FontUIResource(newFont) : newFont;
  }
public static @NotNull Font deriveFont(@NotNull Font oldFont, @NotNull Map<? extends Attribute, ?> attributes)