code: private static FontStyle intToFontStyle(int style) {
          switch (style) {
          case java.awt.Font.PLAIN:
              return FontStyle.PLAIN;
          case java.awt.Font.BOLD:
              return FontStyle.BOLD;
          case java.awt.Font.ITALIC:
              return FontStyle.ITALIC;
          case java.awt.Font.BOLD + java.awt.Font.ITALIC:
              return FontStyle.BOLD_ITALIC;
          default:
              return FontStyle.PLAIN;
          }
      }
docs: Return FontStyle enum value from java.awt.Font style constant.
  
  @param style
  java.awt.Font style constant value.
  @return FontStyle value.