code: public LOADSTATUS loadFont(String path) throws VectorPrintException {
        try {
           File f = new File(path);
           LOADSTATUS stat = LOADSTATUS.NOT_LOADED;
  
           if (loadAWTFonts) {
              Font fo = Font.createFont(Font.TRUETYPE_FONT, f);
              GraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(fo);
              stat = LOADSTATUS.LOADED_ONLY_AWT;
           }
  
           if (loadiText) {
              FontFactory.register(path);
              stat = (stat.equals(LOADSTATUS.LOADED_ONLY_AWT)) ? LOADSTATUS.LOADED_ITEXT_AND_AWT : LOADSTATUS.LOADED_ONLY_ITEXT;
              log.info(String.format("font loaded from %s", f.getAbsolutePath()));
           }
  
           return stat;
        } catch (FontFormatException | IOException ex) {
           log.log(Level.SEVERE, null, ex);
  
           throw new VectorPrintException("failed to load " + path, ex);
        }
     }
docs: Bottleneck method for loading fonts, calls {@link FontFactory#register(java.lang.String) } for iText, {@link GraphicsEnvironment#registerFont(java.awt.Font) }
  for awt.
  @param path the path to the font file
  ed
  @return
  @throws VectorPrintException