Font (@NotNull Font font, @NotNull String text) { if (!SystemInfoRt.isMac /* 'getFontWithFallback' does nothing on macOS */ && font.canDisplayUpTo(text) != -1) { return getFontWithFallback(font); } else { return font; } }