code: public static Font findCompatibleFont(final String text, final Font fallbackFont) {
          final String[] searchFonts = new String[] { Font.SANS_SERIF, Font.SERIF, "Verdana", "Arial Unicode MS",
                  "MS UI Gothic", "MS Mincho", "MS Gothic", "Osaka" };
          for (final String fontName : searchFonts) {
              Font font = fonts.get(fontName);
              if (font == null) {
                  font = new Font(fontName, fallbackFont.getStyle(), fallbackFont.getSize());
              }
  
              if (font.canDisplayUpTo(text) == -1) {
                  logger.info("Font '{}' was capable, returning", fontName);
                  font = font.deriveFont(fallbackFont.getSize2D());
                  return font;
              }
          }
  
          logger.warn("Didn't find any capable fonts for text '{}'", text);
          return fallbackFont;
      }
docs: Finds a font that is capable of displaying the provided text.
  
  @param text the text to display.
  @param fallbackFont the font to fall back to in case no capable font was found
  @return a font suitable for displaying the text