public static @NotNull FontUIResource getFontWithFallback(@NotNull Font font) {
    // On macOS font fallback is implemented in JDK by default
    // (except for explicitly registered fonts, e.g. the fonts we bundle with IDE, for them we don't have a solution now)
    if (!SystemInfoRt.isMac) {
      try {
        if (!FontUtilities.fontSupportsDefaultEncoding(font)) {
          font = FontUtilities.getCompositeFontUIResource(font);
        }
      }
      catch (Throwable e) {
        // this might happen e.g., if we're running under newer runtime, forbidding access to sun.font package
        getLogger().warn(e);
        // this might not give the same result, but we have no choice here
        return StartupUiUtilKt.getFontWithFallback(font.getFamily(), font.getStyle(), font.getSize());
      }
    }
    return font instanceof FontUIResource ? (FontUIResource)font : new FontUIResource(font);
  }
public static @NotNull FontUIResource getFontWithFallback(@NotNull Font font)